Class: YTLJit::GeneratorIABinary
- Includes:
- AssemblerUtilIA
- Defined in:
- lib/ytljit/instruction_ia.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Generator
Instance Method Summary collapse
- #adc(dst, src) ⇒ Object
- #add(dst, src) ⇒ Object
- #addsd(dst, src) ⇒ Object
- #addss(dst, src) ⇒ Object
- #and(dst, src) ⇒ Object
- #call(addr) ⇒ Object
- #call_stephandler ⇒ Object
- #cdq ⇒ Object
- #cmp(dst, src) ⇒ Object
- #comisd(dst, src) ⇒ Object
- #comiss(dst, src) ⇒ Object
- #divsd(dst, src) ⇒ Object
- #divss(dst, src) ⇒ Object
- #fstpl(dst) ⇒ Object
- #idiv(src) ⇒ Object
- #imul(dst, src = nil, src2 = nil) ⇒ Object
-
#initialize(asm, handler = "ytl_step_handler") ⇒ GeneratorIABinary
constructor
A new instance of GeneratorIABinary.
- #int3 ⇒ Object
- #ja(addr) ⇒ Object
- #jae(addr) ⇒ Object
- #jb(addr) ⇒ Object
- #jbe(addr) ⇒ Object
- #jl(addr) ⇒ Object
- #jle(addr) ⇒ Object
- #jmp(addr) ⇒ Object
- #jna(addr) ⇒ Object
- #jnae(addr) ⇒ Object
- #jnb(addr) ⇒ Object
- #jnbe(addr) ⇒ Object
- #jnc(addr) ⇒ Object
- #jnle(addr) ⇒ Object
- #jno(addr) ⇒ Object
- #jnz(addr) ⇒ Object
- #jo(addr) ⇒ Object
- #jz(addr) ⇒ Object
- #lea(dst, src) ⇒ Object
- #mov(dst, src) ⇒ Object
- #movsd(dst, src) ⇒ Object
- #movss(dst, src) ⇒ Object
- #mulsd(dst, src) ⇒ Object
- #mulss(dst, src) ⇒ Object
- #neg(src) ⇒ Object
- #or(dst, src) ⇒ Object
- #pop(dst) ⇒ Object
- #push(dst) ⇒ Object
- #rcl(dst, shftnum = 1) ⇒ Object
- #rcr(dst, shftnum = 1) ⇒ Object
- #ret ⇒ Object
- #rol(dst, shftnum = 1) ⇒ Object
- #ror(dst, shftnum = 1) ⇒ Object
- #sal(dst, shftnum = 1) ⇒ Object
- #sar(dst, shftnum = 1) ⇒ Object
- #sbb(dst, src) ⇒ Object
- #seta(dst) ⇒ Object
- #setae(dst) ⇒ Object
- #setb(dst) ⇒ Object
- #setbe(dst) ⇒ Object
- #setg(dst) ⇒ Object
- #setge(dst) ⇒ Object
- #setl(dst) ⇒ Object
- #setle(dst) ⇒ Object
- #setna(dst) ⇒ Object
- #setnae(dst) ⇒ Object
- #setnb(dst) ⇒ Object
- #setnbe(dst) ⇒ Object
- #setnc(dst) ⇒ Object
- #setnle(dst) ⇒ Object
- #setno(dst) ⇒ Object
- #setnz(dst) ⇒ Object
- #seto(dst) ⇒ Object
- #setz(dst) ⇒ Object
- #shl(dst, shftnum = 1) ⇒ Object
- #shr(dst, shftnum = 1) ⇒ Object
- #sub(dst, src) ⇒ Object
- #subsd(dst, src) ⇒ Object
- #subss(dst, src) ⇒ Object
- #xor(dst, src) ⇒ Object
Methods included from AssemblerUtilIA
#common_arithxmm, #common_jcc, #common_movssd, #common_operand_80, #common_operand_80_imm8, #common_setcc, #common_shift, #nosupported_addressing_mode
Methods included from AssemblerUtilIAModrm
#modrm, #modrm_indirect, #modrm_indirect_off32, #modrm_indirect_off8, #small_integer_32bit?, #small_integer_8bit?
Constructor Details
#initialize(asm, handler = "ytl_step_handler") ⇒ GeneratorIABinary
Returns a new instance of GeneratorIABinary.
794 795 796 797 |
# File 'lib/ytljit/instruction_ia.rb', line 794 def initialize(asm, handler = "ytl_step_handler") super(asm) @step_handler = YTLJit.address_of(handler) end |
Instance Method Details
#adc(dst, src) ⇒ Object
815 816 817 |
# File 'lib/ytljit/instruction_ia.rb', line 815 def adc(dst, src) common_operand_80(dst, src, 0x10, 0x2, :adc) end |
#add(dst, src) ⇒ Object
807 808 809 |
# File 'lib/ytljit/instruction_ia.rb', line 807 def add(dst, src) common_operand_80(dst, src, 0x00, 0x0, :add) end |
#addsd(dst, src) ⇒ Object
1333 1334 1335 |
# File 'lib/ytljit/instruction_ia.rb', line 1333 def addsd(dst, src) common_arithxmm(dst, src, 0xF2, 0x58, :addsd) end |
#addss(dst, src) ⇒ Object
1329 1330 1331 |
# File 'lib/ytljit/instruction_ia.rb', line 1329 def addss(dst, src) common_arithxmm(dst, src, 0xF3, 0x58, :addss) end |
#and(dst, src) ⇒ Object
823 824 825 |
# File 'lib/ytljit/instruction_ia.rb', line 823 def and(dst, src) common_operand_80(dst, src, 0x20, 0x4, :and) end |
#call(addr) ⇒ Object
1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 |
# File 'lib/ytljit/instruction_ia.rb', line 1153 def call(addr) offset = 0 case addr when Integer offset = addr - @asm.current_address - 5 immidiate_call(addr, offset) when OpMemory offset = addr.value - @asm.current_address - 5 immidiate_call(addr, offset) else rexseq, rexfmt = rex(addr, nil) modseq, modfmt = modrm(:call, 2, addr, nil, addr) (rexseq + [0xff] + modseq).pack("#{rexfmt}C#{modfmt}") end end |
#call_stephandler ⇒ Object
799 800 801 802 803 804 805 |
# File 'lib/ytljit/instruction_ia.rb', line 799 def call_stephandler if @asm.step_mode call(@step_handler) else "" end end |
#cdq ⇒ Object
1317 1318 1319 |
# File 'lib/ytljit/instruction_ia.rb', line 1317 def cdq [0x99].pack("C") end |
#cmp(dst, src) ⇒ Object
835 836 837 |
# File 'lib/ytljit/instruction_ia.rb', line 835 def cmp(dst, src) common_operand_80(dst, src, 0x38, 0x7, :cmp) end |
#comisd(dst, src) ⇒ Object
1366 1367 1368 |
# File 'lib/ytljit/instruction_ia.rb', line 1366 def comisd(dst, src) common_arithxmm(dst, src, 0x66, 0x2F, :comisd) end |
#comiss(dst, src) ⇒ Object
1362 1363 1364 |
# File 'lib/ytljit/instruction_ia.rb', line 1362 def comiss(dst, src) common_arithxmm(dst, src, nil, 0x2F, :comiss) end |
#divsd(dst, src) ⇒ Object
1358 1359 1360 |
# File 'lib/ytljit/instruction_ia.rb', line 1358 def divsd(dst, src) common_arithxmm(dst, src, 0xF2, 0x5E, :divsd) end |
#divss(dst, src) ⇒ Object
1354 1355 1356 |
# File 'lib/ytljit/instruction_ia.rb', line 1354 def divss(dst, src) common_arithxmm(dst, src, 0xF3, 0x5E, :divss) end |
#fstpl(dst) ⇒ Object
1307 1308 1309 1310 1311 1312 1313 1314 1315 |
# File 'lib/ytljit/instruction_ia.rb', line 1307 def fstpl(dst) case dst when OpIndirect modseq, modfmt = modrm(:fstpl, 3, dst, dst, nil) return ([0xDD] + modseq).pack("C#{modfmt}") end return nosupported_addressing_mode(:neg, src, nil, nil) end |
#idiv(src) ⇒ Object
1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 |
# File 'lib/ytljit/instruction_ia.rb', line 1269 def idiv(src) rexseq, rexfmt = rex(src, nil) case src when OpReg8, OpMem8 modseq, modfmt = modrm(:idiv, 7, src, src, nil) return ([0xF6] + modseq).pack("C#{modfmt}") when OpIndirect, OpMem32 modseq, modfmt = modrm(:idiv, 7, src, src, nil) return (rexseq + [0xF7] + modseq).pack("#{rexfmt}C#{modfmt}") when OpReg32, OpReg64 modseq, modfmt = modrm(:idiv, 7, src, src, nil) return (rexseq + [0xF7] + modseq).pack("#{rexfmt}C#{modfmt}") end return nosupported_addressing_mode(:idiv, src, nil, nil) end |
#imul(dst, src = nil, src2 = nil) ⇒ Object
1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 |
# File 'lib/ytljit/instruction_ia.rb', line 1207 def imul(dst, src = nil, src2 = nil) rexseq, rexfmt = rex(dst, src) case dst when OpReg8, OpMem8 if src == nil then modseq, modfmt = modrm(:imul, 5, dst, dst, src) return ([0xF6] + modseq).pack("C#{modfmt}") end when OpIndirect, OpMem32 if src == nil then modseq, modfmt = modrm(:imul, 5, dst, dst, src) return (rexseq + [0xF7] + modseq).pack("#{rexfmt}C#{modfmt}") end when OpReg32, OpReg64 case src when nil modseq, modfmt = modrm(:imul, 5, dst, dst, src) return (rexseq + [0xF7] + modseq).pack("#{rexfmt}C#(modfmt}") when OpReg32, OpMem32, OpIndirect, OpReg64 modseq, modfmt = modrm(:imul, dst, src, dst, src, src2) case src2 when nil return (rexseq + [0x0F, 0xAF] + modseq).pack("#{rexfmt}C2#{modfmt}") when OpImmidiate8 fmt = "#{rexfmt}C#{modfmt}C" return (rexseq + [0x6B] + modseq + [src2.value]).pack(fmt) when OpImmidiate32 fmt = "#{rexfmt}C#{modfmt}L" return (rexseq + [0x69] + modseq + [src2.value]).pack(fmt) when Integer fmt = "#{rexfmt}C#{modfmt}L" return (rexseq + [0x69] + modseq + [src2]).pack(fmt) end when OpImmidiate8 modseq, modfmt = modrm(:imul, dst, dst, dst, src) fmt = "#{rexfmt}C#{modfmt}C" return (rexseq + [0x6B] + modseq + [src.value]).pack(fmt) when OpImmidiate32 modseq, modfmt = modrm(:imul, dst, dst, dst, src) fmt = "#{rexfmt}C#{modfmt}L" return (rexseq + [0x69] + modseq + [src.value]).pack(fmt) when Integer modseq, modfmt = modrm(:imul, dst, dst, dst, src) fmt = "#{rexfmt}C#{modfmt}L" return (rexseq + [0x69] + modseq + [src]).pack(fmt) end end return nosupported_addressing_mode(:imul, dst, src, src2) end |
#int3 ⇒ Object
1370 1371 1372 |
# File 'lib/ytljit/instruction_ia.rb', line 1370 def int3 [0xcc].pack("C") end |
#ja(addr) ⇒ Object
997 998 999 |
# File 'lib/ytljit/instruction_ia.rb', line 997 def ja(addr) common_jcc(addr, 0x77, 0x87, :ja) end |
#jae(addr) ⇒ Object
1001 1002 1003 |
# File 'lib/ytljit/instruction_ia.rb', line 1001 def jae(addr) common_jcc(addr, 0x73, 0x83, :jae) end |
#jb(addr) ⇒ Object
1005 1006 1007 |
# File 'lib/ytljit/instruction_ia.rb', line 1005 def jb(addr) common_jcc(addr, 0x72, 0x82, :jb) end |
#jbe(addr) ⇒ Object
1009 1010 1011 |
# File 'lib/ytljit/instruction_ia.rb', line 1009 def jbe(addr) common_jcc(addr, 0x76, 0x86, :jbe) end |
#jl(addr) ⇒ Object
1013 1014 1015 |
# File 'lib/ytljit/instruction_ia.rb', line 1013 def jl(addr) common_jcc(addr, 0x7c, 0x8c, :jl) end |
#jle(addr) ⇒ Object
1017 1018 1019 |
# File 'lib/ytljit/instruction_ia.rb', line 1017 def jle(addr) common_jcc(addr, 0x7e, 0x8e, :jle) end |
#jmp(addr) ⇒ Object
1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 |
# File 'lib/ytljit/instruction_ia.rb', line 1133 def jmp(addr) addr2 = addr if addr.is_a?(OpMemory) then addr2 = addr.value end case addr2 when Integer offset = addr2 - @asm.current_address - 2 if offset > -128 and offset < 127 then [0xeb, offset].pack("C2") else offset = addr2 - @asm.current_address - 5 [0xe9, offset].pack("CL") end else modseq, modfmt = modrm(:jmp, 4, addr2, addr2, nil) ([0xff] + modseq).pack("C#{modfmt}") end end |
#jna(addr) ⇒ Object
1021 1022 1023 |
# File 'lib/ytljit/instruction_ia.rb', line 1021 def jna(addr) common_jcc(addr, 0x76, 0x86, :jna) end |
#jnae(addr) ⇒ Object
1025 1026 1027 |
# File 'lib/ytljit/instruction_ia.rb', line 1025 def jnae(addr) common_jcc(addr, 0x72, 0x82, :jnae) end |
#jnb(addr) ⇒ Object
1029 1030 1031 |
# File 'lib/ytljit/instruction_ia.rb', line 1029 def jnb(addr) common_jcc(addr, 0x73, 0x83, :jnb) end |
#jnbe(addr) ⇒ Object
1033 1034 1035 |
# File 'lib/ytljit/instruction_ia.rb', line 1033 def jnbe(addr) common_jcc(addr, 0x77, 0x87, :jnbe) end |
#jnc(addr) ⇒ Object
1037 1038 1039 |
# File 'lib/ytljit/instruction_ia.rb', line 1037 def jnc(addr) common_jcc(addr, 0x73, 0x83, :jnc) end |
#jnle(addr) ⇒ Object
1041 1042 1043 |
# File 'lib/ytljit/instruction_ia.rb', line 1041 def jnle(addr) common_jcc(addr, 0x7f, 0x8f, :jnle) end |
#jno(addr) ⇒ Object
1045 1046 1047 |
# File 'lib/ytljit/instruction_ia.rb', line 1045 def jno(addr) common_jcc(addr, 0x71, 0x81, :jno) end |
#jnz(addr) ⇒ Object
1057 1058 1059 |
# File 'lib/ytljit/instruction_ia.rb', line 1057 def jnz(addr) common_jcc(addr, 0x75, 0x85, :jnz) end |
#jo(addr) ⇒ Object
1049 1050 1051 |
# File 'lib/ytljit/instruction_ia.rb', line 1049 def jo(addr) common_jcc(addr, 0x70, 0x80, :jo) end |
#jz(addr) ⇒ Object
1053 1054 1055 |
# File 'lib/ytljit/instruction_ia.rb', line 1053 def jz(addr) common_jcc(addr, 0x74, 0x84, :jz) end |
#lea(dst, src) ⇒ Object
953 954 955 956 957 958 959 960 961 962 963 964 965 |
# File 'lib/ytljit/instruction_ia.rb', line 953 def lea(dst, src) unless dst.is_a?(OpReg32) or dst.is_a?(OpReg64) return nosupported_addressing_mode(:lea, dst, src) end if !src.is_a?(OpIndirect) return nosupported_addressing_mode(:lea, dst, src) end rexseq, rexfmt = rex(src, dst) modseq, modfmt = modrm(:lea, dst, src, dst, src) (rexseq + [0x8D] + modseq).pack("#{rexfmt}C#{modfmt}") end |
#mov(dst, src) ⇒ Object
839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 |
# File 'lib/ytljit/instruction_ia.rb', line 839 def mov(dst, src) case dst when OpReg8 case src when OpImmidiate8 [0xB0 + (dst.reg_no & 7), src.value].pack("C2") when Integer [0xB0 + (dst.reg_no & 7), src].pack("C2") when OpReg8 modseq, modfmt = modrm(:mov, dst, src, dst, src) ([0x88] + modseq).pack("C#{modfmt}") when OpIndirect modseq, modfmt = modrm(:mov, dst, src, dst, src) ([0x8A] + modseq).pack("C#{modfmt}") else return nosupported_addressing_mode(:mov, dst, src) end when OpReg32 case src when OpImmidiate32 [0xB8 + (dst.reg_no & 7), src.value].pack("CL") when Integer [0xB8 + (dst.reg_no & 7), src].pack("CL") when OpReg32, OpReg64 rexseq, rexfmt = rex(dst, src) modseq, modfmt = modrm(:mov, src, dst, dst, src) (rexseq + [0x89] + modseq).pack("#{rexfmt}C#{modfmt}") when OpIndirect rexseq, rexfmt = rex(dst, src) modseq, modfmt = modrm(:mov, dst, src, dst, src) (rexseq + [0x8B] + modseq).pack("#{rexfmt}C#{modfmt}") else return nosupported_addressing_mode(:mov, dst, src) end when OpReg64 case src when OpImmidiate32 rexseq, rexfmt = rex(dst, src) modseq, modfmt = modrm(:mov, 0, dst, dst, src) (rexseq + [0xC7] + modseq + [src.value]).pack("#{rexfmt}C#{modfmt}L") when Integer rexseq, rexfmt = rex(dst, src) if small_integer_32bit?(src) then modseq, modfmt = modrm(:mov, 0, dst, dst, src) (rexseq + [0xC7] + modseq + [src]).pack("#{rexfmt}C#{modfmt}L") else [*rexseq, 0xB8 + (dst.reg_no & 7), src].pack("#{rexfmt}CQ") end when OpImmidiate64 rexseq, rexfmt = rex(dst, src) [*rexseq, 0xB8 + (dst.reg_no & 7), src.value].pack("#{rexfmt}CQ") when OpReg32, OpReg64 rexseq, rexfmt = rex(dst, src) modseq, modfmt = modrm(:mov, src, dst, dst, src) (rexseq + [0x89] + modseq).pack("#{rexfmt}C#{modfmt}") when OpIndirect rexseq, rexfmt = rex(src, dst) modseq, modfmt = modrm(:mov, dst, src, dst, src) (rexseq + [0x8B] + modseq).pack("#{rexfmt}C#{modfmt}") else return nosupported_addressing_mode(:mov, dst, src) end when OpIndirect case src when OpReg8 rexseq, rexfmt = rex(dst, src) modseq, modfmt = modrm(:mov, src, dst, dst, src) (rexseq + [0x88] + modseq).pack("#{rexfmt}C#{modfmt}") when OpReg32, OpReg64 rexseq, rexfmt = rex(dst, src) modseq, modfmt = modrm(:mov, src, dst, dst, src) (rexseq + [0x89] + modseq).pack("#{rexfmt}C#{modfmt}") when OpImmidiate8 rexseq, rexfmt = rex(dst, 0) modseq, modfmt = modrm(:mov, 0, dst, dst, src) (rexseq + [0xC6] + modseq + [src.value]).pack("#{rexfmt}C#{modfmt}C") when OpImmidiate32 rexseq, rexfmt = rex(dst, 0) modseq, modfmt = modrm(:mov, 0, dst, dst, src) (rexseq + [0xC7] + modseq + [src.value]).pack("#{rexfmt}C#{modfmt}L") when Integer rexseq, rexfmt = rex(dst, 0) modseq, modfmt = modrm(:mov, 0, dst, dst, src) (rexseq + [0xC7] + modseq + [src]).pack("#{rexfmt}C#{modfmt}L") else return nosupported_addressing_mode(:mov, dst, src) end else return nosupported_addressing_mode(:mov, dst, src) end end |
#movsd(dst, src) ⇒ Object
1325 1326 1327 |
# File 'lib/ytljit/instruction_ia.rb', line 1325 def movsd(dst, src) common_movssd(dst, src, 0xF2, :movsd) end |
#movss(dst, src) ⇒ Object
1321 1322 1323 |
# File 'lib/ytljit/instruction_ia.rb', line 1321 def movss(dst, src) common_movssd(dst, src, 0xF3, :movss) end |
#mulsd(dst, src) ⇒ Object
1350 1351 1352 |
# File 'lib/ytljit/instruction_ia.rb', line 1350 def mulsd(dst, src) common_arithxmm(dst, src, 0xF2, 0x59, :mulsd) end |
#mulss(dst, src) ⇒ Object
1346 1347 1348 |
# File 'lib/ytljit/instruction_ia.rb', line 1346 def mulss(dst, src) common_arithxmm(dst, src, 0xF3, 0x59, :mulss) end |
#neg(src) ⇒ Object
1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 |
# File 'lib/ytljit/instruction_ia.rb', line 1288 def neg(src) rexseq, rexfmt = rex(src, nil) case src when OpReg8, OpMem8 modseq, modfmt = modrm(:neg, 3, src, src, nil) return ([0xF6] + modseq).pack("C#{modfmt}") when OpIndirect, OpMem32 modseq, modfmt = modrm(:neg, 3, src, src, nil) return (rexseq + [0xF7] + modseq).pack("#{rexfmt}C#{modfmt}") when OpReg32, OpReg64 modseq, modfmt = modrm(:neg, 3, src, src, nil) return (rexseq + [0xF7] + modseq).pack("#{rexfmt}C#{modfmt}") end return nosupported_addressing_mode(:neg, src, nil, nil) end |
#or(dst, src) ⇒ Object
811 812 813 |
# File 'lib/ytljit/instruction_ia.rb', line 811 def or(dst, src) common_operand_80(dst, src, 0x08, 0x1, :or) end |
#pop(dst) ⇒ Object
982 983 984 985 986 987 988 989 990 991 992 993 994 995 |
# File 'lib/ytljit/instruction_ia.rb', line 982 def pop(dst) rexseq, rexfmt = rex(dst, nil) case dst when OpReg32, OpReg64 [*rexseq, 0x58 + (dst.reg_no & 7)].pack("#{rexfmt}C") when OpIndirect modseq, modfmt = modrm(:pop, 0, dst, dst, nil) ([0x8F] + modseq).pack("C#{modfmt}") else return nosupported_addressing_mode(:pop, dst, nil) end end |
#push(dst) ⇒ Object
967 968 969 970 971 972 973 974 975 976 977 978 979 980 |
# File 'lib/ytljit/instruction_ia.rb', line 967 def push(dst) rexseq, rexfmt = rex(dst, nil) case dst when OpReg32, OpReg64 [*rexseq, 0x50 + (dst.reg_no & 7)].pack("#{rexfmt}C") when OpIndirect modseq, modfmt = modrm(:push, 6, dst, dst, nil) (rexseq + [0xFF] + modseq).pack("#{rexfmt}C#{modfmt}") else return nosupported_addressing_mode(:push, dst, nil) end end |
#rcl(dst, shftnum = 1) ⇒ Object
1191 1192 1193 |
# File 'lib/ytljit/instruction_ia.rb', line 1191 def rcl(dst, shftnum = 1) common_shift(dst, 2, shftnum, :rcl) end |
#rcr(dst, shftnum = 1) ⇒ Object
1195 1196 1197 |
# File 'lib/ytljit/instruction_ia.rb', line 1195 def rcr(dst, shftnum = 1) common_shift(dst, 3, shftnum, :rcr) end |
#ret ⇒ Object
1171 1172 1173 |
# File 'lib/ytljit/instruction_ia.rb', line 1171 def ret [0xc3].pack("C") end |
#rol(dst, shftnum = 1) ⇒ Object
1199 1200 1201 |
# File 'lib/ytljit/instruction_ia.rb', line 1199 def rol(dst, shftnum = 1) common_shift(dst, 0, shftnum, :rol) end |
#ror(dst, shftnum = 1) ⇒ Object
1203 1204 1205 |
# File 'lib/ytljit/instruction_ia.rb', line 1203 def ror(dst, shftnum = 1) common_shift(dst, 1, shftnum, :ror) end |
#sal(dst, shftnum = 1) ⇒ Object
1175 1176 1177 |
# File 'lib/ytljit/instruction_ia.rb', line 1175 def sal(dst, shftnum = 1) common_shift(dst, 4, shftnum, :sal) end |
#sar(dst, shftnum = 1) ⇒ Object
1179 1180 1181 |
# File 'lib/ytljit/instruction_ia.rb', line 1179 def sar(dst, shftnum = 1) common_shift(dst, 7, shftnum, :sar) end |
#sbb(dst, src) ⇒ Object
819 820 821 |
# File 'lib/ytljit/instruction_ia.rb', line 819 def sbb(dst, src) common_operand_80(dst, src, 0x18, 0x3, :sbb) end |
#seta(dst) ⇒ Object
1061 1062 1063 |
# File 'lib/ytljit/instruction_ia.rb', line 1061 def seta(dst) common_setcc(dst, 0x97, :seta) end |
#setae(dst) ⇒ Object
1065 1066 1067 |
# File 'lib/ytljit/instruction_ia.rb', line 1065 def setae(dst) common_setcc(dst, 0x93, :setae) end |
#setb(dst) ⇒ Object
1069 1070 1071 |
# File 'lib/ytljit/instruction_ia.rb', line 1069 def setb(dst) common_setcc(dst, 0x92, :setb) end |
#setbe(dst) ⇒ Object
1073 1074 1075 |
# File 'lib/ytljit/instruction_ia.rb', line 1073 def setbe(dst) common_setcc(dst, 0x96, :setbe) end |
#setg(dst) ⇒ Object
1077 1078 1079 |
# File 'lib/ytljit/instruction_ia.rb', line 1077 def setg(dst) common_setcc(dst, 0x9f, :setg) end |
#setge(dst) ⇒ Object
1081 1082 1083 |
# File 'lib/ytljit/instruction_ia.rb', line 1081 def setge(dst) common_setcc(dst, 0x9d, :setge) end |
#setl(dst) ⇒ Object
1085 1086 1087 |
# File 'lib/ytljit/instruction_ia.rb', line 1085 def setl(dst) common_setcc(dst, 0x9c, :setl) end |
#setle(dst) ⇒ Object
1089 1090 1091 |
# File 'lib/ytljit/instruction_ia.rb', line 1089 def setle(dst) common_setcc(dst, 0x9e, :setle) end |
#setna(dst) ⇒ Object
1093 1094 1095 |
# File 'lib/ytljit/instruction_ia.rb', line 1093 def setna(dst) common_setcc(dst, 0x96, :setna) end |
#setnae(dst) ⇒ Object
1097 1098 1099 |
# File 'lib/ytljit/instruction_ia.rb', line 1097 def setnae(dst) common_setcc(dst, 0x92, :setnae) end |
#setnb(dst) ⇒ Object
1101 1102 1103 |
# File 'lib/ytljit/instruction_ia.rb', line 1101 def setnb(dst) common_setcc(dst, 0x93, :setnb) end |
#setnbe(dst) ⇒ Object
1105 1106 1107 |
# File 'lib/ytljit/instruction_ia.rb', line 1105 def setnbe(dst) common_setcc(dst, 0x97, :setnbe) end |
#setnc(dst) ⇒ Object
1109 1110 1111 |
# File 'lib/ytljit/instruction_ia.rb', line 1109 def setnc(dst) common_setcc(dst, 0x93, :setnc) end |
#setnle(dst) ⇒ Object
1113 1114 1115 |
# File 'lib/ytljit/instruction_ia.rb', line 1113 def setnle(dst) common_setcc(dst, 0x9f, :setnle) end |
#setno(dst) ⇒ Object
1117 1118 1119 |
# File 'lib/ytljit/instruction_ia.rb', line 1117 def setno(dst) common_setcc(dst, 0x91, :setno) end |
#setnz(dst) ⇒ Object
1129 1130 1131 |
# File 'lib/ytljit/instruction_ia.rb', line 1129 def setnz(dst) common_setcc(dst, 0x95, :setnz) end |
#seto(dst) ⇒ Object
1121 1122 1123 |
# File 'lib/ytljit/instruction_ia.rb', line 1121 def seto(dst) common_setcc(dst, 0x90, :seto) end |
#setz(dst) ⇒ Object
1125 1126 1127 |
# File 'lib/ytljit/instruction_ia.rb', line 1125 def setz(dst) common_setcc(dst, 0x94, :setz) end |
#shl(dst, shftnum = 1) ⇒ Object
1183 1184 1185 |
# File 'lib/ytljit/instruction_ia.rb', line 1183 def shl(dst, shftnum = 1) common_shift(dst, 4, shftnum, :shl) end |
#shr(dst, shftnum = 1) ⇒ Object
1187 1188 1189 |
# File 'lib/ytljit/instruction_ia.rb', line 1187 def shr(dst, shftnum = 1) common_shift(dst, 5, shftnum, :shr) end |
#sub(dst, src) ⇒ Object
827 828 829 |
# File 'lib/ytljit/instruction_ia.rb', line 827 def sub(dst, src) common_operand_80(dst, src, 0x28, 0x5, :sub) end |
#subsd(dst, src) ⇒ Object
1341 1342 1343 |
# File 'lib/ytljit/instruction_ia.rb', line 1341 def subsd(dst, src) common_arithxmm(dst, src, 0xF2, 0x5C, :subsd) end |
#subss(dst, src) ⇒ Object
1337 1338 1339 |
# File 'lib/ytljit/instruction_ia.rb', line 1337 def subss(dst, src) common_arithxmm(dst, src, 0xF3, 0x5C, :subss) end |
#xor(dst, src) ⇒ Object
831 832 833 |
# File 'lib/ytljit/instruction_ia.rb', line 831 def xor(dst, src) common_operand_80(dst, src, 0x30, 0x6, :xor) end |