Search
lxdream.org :: lxdream/src/xlat/x86/x86op.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/xlat/x86/x86op.h
changeset 1147:e04e4af64626
prev1112:4cac5e474d4c
next1176:70feb1749427
author nkeynes
date Mon Nov 08 22:10:47 2010 +1000 (10 years ago)
permissions -rw-r--r--
last change Suggest to the compiler a little more firmly that it inline the x86op
functions (as these are nearly always called with constants, they can
usually be reduced down pretty dramatically)
file annotate diff log raw
1.1 --- a/src/xlat/x86/x86op.h Tue Jul 13 18:23:16 2010 +1000
1.2 +++ b/src/xlat/x86/x86op.h Mon Nov 08 22:10:47 2010 +1000
1.3 @@ -154,7 +154,7 @@
1.4 /**
1.5 * Encode opcode+reg with no mod/rm (eg MOV imm64, r32)
1.6 */
1.7 -static void x86_encode_opcodereg( int rexw, uint32_t opcode, int reg )
1.8 +static inline void x86_encode_opcodereg( int rexw, uint32_t opcode, int reg )
1.9 {
1.10 int rex = rexw;
1.11 reg &= 0x0F;
1.12 @@ -174,7 +174,7 @@
1.13 * @param rr reg field
1.14 * @param rb r/m field
1.15 */
1.16 -static void x86_encode_reg_rm( int rexw, uint32_t opcode, int rr, int rb )
1.17 +static inline void x86_encode_reg_rm( int rexw, uint32_t opcode, int rr, int rb )
1.18 {
1.19 int rex = rexw;
1.20 rr &= 0x0F;
1.21 @@ -203,7 +203,7 @@
1.22 * @param ss Scale shift (0..3) applied to index register (ignored if no index register)
1.23 * @param disp32 Signed displacement (0 for none)
1.24 */
1.25 -static void x86_encode_modrm( int rexw, uint32_t opcode, int rr, int rb, int rx, int ss, int32_t disp32 )
1.26 +static inline void FORCEINLINE x86_encode_modrm( int rexw, uint32_t opcode, int rr, int rb, int rx, int ss, int32_t disp32 )
1.27 {
1.28 /* Construct the rex prefix where necessary */
1.29 int rex = rexw;
1.30 @@ -290,7 +290,7 @@
1.31 * @param rr mod/rm reg field
1.32 * @param disp32 RIP-relative displacement
1.33 */
1.34 -static void x86_encode_modrm_rip(int rexw, uint32_t opcode, int rr, int32_t disp32)
1.35 +static inline void x86_encode_modrm_rip(int rexw, uint32_t opcode, int rr, int32_t disp32)
1.36 {
1.37 int rex = rexw;
1.38 rr &= 0x0F;
.