[lld] [lld] Add thunks for hexagon (PR #111217)

Brian Cain via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 16:58:42 PST 2024


================
@@ -0,0 +1,119 @@
+# REQUIRES: hexagon
+# RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-linux-musl %s -o %t.o
+# RUN: ld.lld %t.o -o %t
+# RUN: llvm-objdump -d %t 2>&1 | FileCheck --check-prefix=CHECK-NONPIC %s
+# RUN: llvm-mc -filetype=obj --position-independent \
+# RUN:         -triple=hexagon-unknown-linux-musl %s -o %t.o
+# RUN: ld.lld --pie %t.o -o %t
+# RUN: llvm-objdump -d %t 2>&1 | FileCheck --check-prefix=CHECK-PIC %s
+
+# Packets with pc-relative relocations are more interesting because
----------------
androm3da wrote:

> `## ` for non-RUN non-CHECK lines.

Fixed.  Is this an `lld`-ism or should I be doing the same in other llvm-project lit test cases?

> What is 'Packets'?

In hexagon, bundles of opcodes spanning multiple instruction words are dispatched together as one.  The braces in the assembly / disassembly syntax delimit the instructions in a packet.

Would it be helpful to add this context to this test case? or somewhere else in `lld`?

https://github.com/llvm/llvm-project/pull/111217


More information about the llvm-commits mailing list