Skip to content

arm64: expected absolute expression #473

@bwendling

Description

@bwendling

I'm seeing this with ARM64, but I think it's a generic failure. This occurs when compiling arch/arm64/kernel/vdso/gettimeofday.S:

$ cat bad.s
.macro jump_slot jumptable, index, label
.if (. - \jumptable) != 4 * (\index)
.error "Jump slot index mismatch"
.endif
  b \label
.endm

.text
jumptable:
  jump_slot jumptable, 0, realtime

$ clang -cc1as -triple aarch64-grtev4-linux-gnu -target-cpu generic -target-feature +neon -mrelocation-model static -o /dev/null bad.s
<instantiation>:1:5: error: expected absolute expression
.if (. - jumptable) != 4 * (0)
    ^
bad.s:10:3: note: while in macro instantiation
  jump_slot jumptable, 0, realtime
  ^
<instantiation>:2:1: error: Jump slot index mismatch
.error "Jump slot index mismatch"
^
bad.s:10:3: note: while in macro instantiation
  jump_slot jumptable, 0, realtime
  ^

Metadata

Metadata

Assignees

Labels

[BUG] llvmA bug that should be fixed in upstream LLVM[FIXED][LLVM] 10This bug was fixed in LLVM 10.0[TOOL] integrated-asThe issue is relevant to LLVM integrated assembler

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions