mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm
This commit is contained in:
commit
b001e89859
@ -1601,10 +1601,9 @@ static void gencode(int32_t segment, int32_t offset, int bits,
|
||||
case 2:
|
||||
case 4:
|
||||
data = ins->oprs[(c >> 3) & 7].offset;
|
||||
if (ea_data.rip && (ins->oprs[(c >> 3) & 7].segment == 0xFFFFFFFF))
|
||||
ea_data.rip = 0; /* Make distinction between Symbols and Immediates */
|
||||
out(offset, segment, &data, /* RIP = Relative, not Absolute */
|
||||
(ea_data.rip ? OUT_REL4ADR : OUT_ADDRESS) + ea_data.bytes,
|
||||
out(offset, segment, &data,
|
||||
(ea_data.rip ? OUT_REL4ADR : OUT_ADDRESS)
|
||||
+ ea_data.bytes,
|
||||
ins->oprs[(c >> 3) & 7].segment,
|
||||
ins->oprs[(c >> 3) & 7].wrt);
|
||||
s += ea_data.bytes;
|
||||
|
@ -87,7 +87,7 @@ AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_SUBST_FILE(XOBJS)
|
||||
AC_SUBST(XOBJS)
|
||||
|
||||
AC_CHECK_FUNCS(strcspn, ,
|
||||
AC_MSG_ERROR([NASM requires ANSI C (specifically, "strcspn")]))
|
||||
|
1188
test/riprel.asm
1188
test/riprel.asm
File diff suppressed because it is too large
Load Diff
@ -5,15 +5,17 @@ print "\tbits 64\n";
|
||||
foreach $mode ('abs', 'rel') {
|
||||
print "\n\tdefault $mode\n\n";
|
||||
|
||||
foreach $rq ('', 'abs ', 'rel ') {
|
||||
foreach $sq ('', 'dword ', 'qword ') {
|
||||
foreach $v ('foo', '0xaaaaaaaaaaaaaaaa', '0xbbbbbbbb',
|
||||
'0xffffffffcccccccc') {
|
||||
foreach $r ('al', 'bl', 'ax', 'bx', 'eax', 'ebx', 'rax', 'rbx') {
|
||||
print "\tmov $r,[$rq$sq$v]\n";
|
||||
foreach $so ('', 'fs:', 'es:') {
|
||||
foreach $rq ('', 'abs ', 'rel ') {
|
||||
foreach $sq ('', 'dword ', 'qword ') {
|
||||
foreach $v ('foo', '0xaaaaaaaaaaaaaaaa', '0xbbbbbbbb',
|
||||
'0xffffffffcccccccc') {
|
||||
foreach $r ('al', 'bl', 'ax', 'bx', 'eax', 'ebx', 'rax', 'rbx') {
|
||||
print "\tmov $r,[$rq$sq$so$v]\n";
|
||||
}
|
||||
}
|
||||
print "\n";
|
||||
}
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user