Discussion:
abount dynasm compile problem
lvzixun
2014-08-19 04:30:14 UTC
Permalink
吕子熏
2014-08-19 05:21:31 UTC
Permalink
I’m making a jit program with dynasm tool. the `ah` register is
compiled to `spl` when using r8-r11 register.

the code:
uint8_t _data[] = {0x01, 0x00};

|.type v_tmp, uint8_t, r8
|.type v_src, uint8_t, rcx

| mov64 v_src, (uintptr_t)_data
| mov v_tmp, v_src
| mov ah, v_tmp[0]
| mov ah, v_src[0]

assembly (using lldb):
0x100038009: movabsq $0x7fff5fbffabe, %rcx
0x100038013: movq %rcx, %r8
0x100038016: movb (%r8), %spl // the `ah` register is changed to
`spl` when using r8-r9 register
0x100038019: movb (%rcx), %ah

I using the dynasm version is 1.3.0. this could be one of dynasm bug. Isn’t it?

THK ;)
I’m making a jit program with dynasm tool. the `ah` register is compiled to
`spl` when using r8-r11 register.
uint8_t _data[] = {0x01, 0x00};
|.type v_tmp, uint8_t, r8
|.type v_src, uint8_t, rcx
| mov64 v_src, (uintptr_t)_data
| mov v_tmp, v_src
| mov ah, v_tmp[0]
| mov ah, v_src[0]
0x100038009: movabsq $0x7fff5fbffabe, %rcx
0x100038013: movq %rcx, %r8
0x100038016: movb (%r8), %spl // the `ah` register is changed to `spl` when
using r8-r9 register
0x100038019: movb (%rcx), %ah
I using the dynasm version is 1.3.0. this could be one of dynasm bug. Isn’t
it?
Loading...