mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-18 02:16:43 +00:00
The darwin integrated assembler for X86 in 64-bit mode is not rejecting
32-bit absolute addressing in instructions likei this: mov $_f, %rsi which is not supported in 64-bit mode. rdar://8827134 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189543 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c08bd51181
commit
e54726a87a
@ -323,8 +323,13 @@ void X86MachObjectWriter::RecordX86_64Relocation(MachObjectWriter *Writer,
|
||||
report_fatal_error("TLVP symbol modifier should have been rip-rel");
|
||||
} else if (Modifier != MCSymbolRefExpr::VK_None)
|
||||
report_fatal_error("unsupported symbol modifier in relocation");
|
||||
else
|
||||
else {
|
||||
Type = macho::RIT_X86_64_Unsigned;
|
||||
unsigned Kind = Fixup.getKind();
|
||||
if (Kind == X86::reloc_signed_4byte)
|
||||
report_fatal_error("32-bit absolute addressing is not supported in "
|
||||
"64-bit mode");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
5
test/MC/MachO/bad-darwin-x86_64-32-bit-abs-addr.s
Normal file
5
test/MC/MachO/bad-darwin-x86_64-32-bit-abs-addr.s
Normal file
@ -0,0 +1,5 @@
|
||||
// RUN: not llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - 2> %t.err > %t
|
||||
// RUN: FileCheck --check-prefix=CHECK-ERROR < %t.err %s
|
||||
|
||||
mov $_f, %rsi
|
||||
// CHECK-ERROR: 32-bit absolute addressing is not supported in 64-bit mode
|
Loading…
x
Reference in New Issue
Block a user