Skip to content

Commit 3d96ea6

Browse files
author
H. Peter Anvin (Intel)
committed
assemble: weaken the test for "absolute address can not be RIP-relative"
The test for "absolute address can not be RIP-relative" is too strict and causes false positive failures. Fixes: #145 Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
1 parent a8a1dc2 commit 3d96ea6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

asm/assemble.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3462,8 +3462,7 @@ static int process_ea(operand *input, int rfield, opflags_t rflags,
34623462
input->type |= IP_REL;
34633463
}
34643464
if ((input->type & IP_REL) == IP_REL) {
3465-
if (input->segment == NO_SEG ||
3466-
(input->opflags & OPFLAG_RELATIVE)) {
3465+
if (!pass_first() && absolute_op(input)) {
34673466
nasm_warn(WARN_EA_ABSOLUTE,
34683467
"absolute address can not be RIP-relative");
34693468
input->type &= ~IP_REL;

0 commit comments

Comments
 (0)