mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-03-06 21:47:32 +00:00
Adds a couple LEA unit tests for 16bit addressing mode
This commit is contained in:
parent
e884525434
commit
6b7d508401
43
unittests/32Bit_ASM/Primary/Primary_8D.asm
Normal file
43
unittests/32Bit_ASM/Primary/Primary_8D.asm
Normal file
@ -0,0 +1,43 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x4000",
|
||||
"RBX": "0x4000",
|
||||
"RCX": "0x8000",
|
||||
"RDX": "0x9000",
|
||||
"RSI": "0x7FC0",
|
||||
"RSP": "0xFFFF7FC0",
|
||||
"RBP": "0x1"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
mov eax, 0
|
||||
mov ebx, 0
|
||||
mov esp, -1
|
||||
|
||||
; Specific encoded `lea ax, [0x4000]`
|
||||
; Operand size override and address size override
|
||||
; Nasm doesn't seem to emit this at all
|
||||
db 0x67, 0x66, 0x8d, 0x06, 0x00, 0x40
|
||||
|
||||
lea bx, [0xC000]
|
||||
lea si, [0x4001]
|
||||
|
||||
mov ebp, 0
|
||||
; Try to LEA past the 16bits
|
||||
lea ebp, [bx + si]
|
||||
|
||||
lea bx, [0x4000]
|
||||
lea si, [0x4000]
|
||||
|
||||
; Address size override and Operand size overrides
|
||||
lea cx, [bx + si]
|
||||
lea dx, [bx + si + 0x1000]
|
||||
lea sp, [bx + si - 64]
|
||||
|
||||
; Address size override without operand size override
|
||||
lea esi, [bx + si - 64]
|
||||
|
||||
hlt
|
Loading…
x
Reference in New Issue
Block a user