Files
llvm-6502/test/MC/X86/expand-var.s
Rafael Espindola d033c4b576 Fix fixup evaluation when deciding what to relocate with.
The previous logic was to first try without relocations at all
and failing that stop on the first defined symbol.

That was inefficient and incorrect in the case part of the
expression could be simplified and another part could not
(see included test).

We now stop the evaluation when we get to a variable whose value
can change (i.e. is weak).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233187 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-25 13:16:53 +00:00

13 lines
280 B
ArmAsm

// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux < %s | llvm-readobj -r | FileCheck %s
// CHECK: Section (2) .rela.text {
// CHECK-NEXT: 0x0 R_X86_64_32 d 0x0
// CHECK-NEXT: }
a:
b = a
c = a
d = a
.weak d
.long d + (b - c)