[llvm-bugs] [Bug 38642] New: [IA][ARM64] literal value out of range for directive

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 20 10:18:07 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38642

            Bug ID: 38642
           Summary: [IA][ARM64] literal value out of range for directive
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ndesaulniers at google.com
                CC: echristo at gmail.com, kristof.beyls at arm.com,
                    kristof.beyls at gmail.com, llvm-bugs at lists.llvm.org,
                    oliver.stannard at arm.com, srhines at google.com

Created attachment 20744
  --> https://bugs.llvm.org/attachment.cgi?id=20744&action=edit
test.S

In the Linux kernel
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/crypto/aes-modes.S),
there's an assembly instruction:

        ldr             q8, =0x30000000200000001        /* addends 1,2,3[,0] */

This produces the error: literal value out of range for directive

I'm not sure what the `=` is supposed to do. 0x30000000200000001 is 9B (72b),
so q8 must be a vector register?

$ cat /tmp/test.S 
.text
.global _start

_start:
  ldr q8, =0x30000000200000001

$ aarch64-linux-gnu-as /tmp/test.S
$ aarch64-linux-gnu-objdump -D a.out

a.out:     file format elf64-littleaarch64


Disassembly of section .text:

0000000000000000 <_start>:
   0:   9c000088        ldr     q8, 10 <_start+0x10>
        ...
  10:   00000001        .word   0x00000001
  14:   00000002        .word   0x00000002
  18:   00000003        .word   0x00000003
  1c:   00000000        .word   0x00000000

$ clang -target aarch64-linux-gnu /tmp/test.S          
/tmp/test.S:5:12: error: literal value out of range for directive
  ldr q8, =0x30000000200000001
           ^

I thought that =0x30000000200000001 was maybe an immediate, but changing the
`=` to a `#` produces a `bignum invalid` error in gas, and the same error in
this bug's title in Clang.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180820/7adba41e/attachment.html>


More information about the llvm-bugs mailing list