Skip to content

Commit dffa6f9

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:c0722478d5c1 into amd-gfx:94e1716d2b22
Local branch amd-gfx 94e1716 Merged main:ea81e31aa11c into amd-gfx:376ca00d5225 Remote branch main c072247 [lld][ELF] Add getBitcodeMachineKind test for LoongArch (llvm#71931)
2 parents 94e1716 + c072247 commit dffa6f9

File tree

5 files changed

+223
-175
lines changed

5 files changed

+223
-175
lines changed

lld/test/ELF/lto/loongarch.ll

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
; REQUIRES: loongarch
2+
;; Test we can infer the e_machine value EM_LOONGARCH from a bitcode file.
3+
4+
; RUN: split-file %s %t
5+
; RUN: llvm-as %t/32.ll -o %t/32.o
6+
; RUN: ld.lld %t/32.o -o %t/32
7+
; RUN: llvm-readobj -h %t/32 | FileCheck %s --check-prefixes=CHECK,LA32
8+
9+
; RUN: llvm-as %t/64.ll -o %t/64.o
10+
; RUN: ld.lld %t/64.o -o %t/64
11+
; RUN: llvm-readobj -h %t/64 | FileCheck %s --check-prefixes=CHECK,LA64
12+
13+
; LA32: Class: 32-bit
14+
; LA64: Class: 64-bit
15+
; CHECK: DataEncoding: LittleEndian
16+
; CHECK: Machine: EM_LOONGARCH
17+
18+
;--- 32.ll
19+
target datalayout = "e-m:e-p:32:32-i64:64-n32-S128"
20+
target triple = "loongarch32-unknown-elf"
21+
22+
define void @_start() {
23+
ret void
24+
}
25+
26+
;--- 64.ll
27+
target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n64-S128"
28+
target triple = "loongarch64-unknown-elf"
29+
30+
define void @_start() {
31+
ret void
32+
}

llvm/include/llvm/Config/llvm-config.h.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* Indicate that this is LLVM compiled from the amd-gfx branch. */
1818
#define LLVM_HAVE_BRANCH_AMD_GFX
19-
#define LLVM_MAIN_REVISION 481626
19+
#define LLVM_MAIN_REVISION 481630
2020

2121
/* Define if LLVM_ENABLE_DUMP is enabled */
2222
#cmakedefine LLVM_ENABLE_DUMP

llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -549,11 +549,7 @@ enum : uint64_t {
549549
/// byte to specify a destination which in this case is memory and operand 3
550550
/// with VEX.VVVV, and also encodes a condition code.
551551
MRMDestMem4VOp3CC = 20,
552-
/// MRM[0-7][rm] - These forms are used to represent instructions that use
553-
/// a Mod/RM byte, and use the middle field to hold extended opcode
554-
/// information. In the intel manual these are represented as /0, /1, ...
555-
///
556-
// Instructions operate on a register Reg/Opcode operand not the r/m field.
552+
/// Instructions operate on a register Reg/Opcode operand not the r/m field.
557553
MRMr0 = 21,
558554
/// MRMSrcMem - But force to use the SIB field.
559555
MRMSrcMemFSIB = 22,
@@ -581,7 +577,8 @@ enum : uint64_t {
581577
/// MRMXm - This form is used for instructions that use the Mod/RM byte
582578
/// to specify a memory source, but doesn't use the middle field.
583579
MRMXm = 31,
584-
/// MRM0m-MRM7m - Instructions that operate on a memory r/m operand.
580+
/// MRM0m-MRM7m - Instructions that operate on a memory r/m operand and use
581+
/// reg field to hold extended opcode, which is represented as /0, /1, ...
585582
MRM0m = 32, // Format /0
586583
MRM1m = 33, // Format /1
587584
MRM2m = 34, // Format /2
@@ -612,7 +609,8 @@ enum : uint64_t {
612609
/// MRMXr - This form is used for instructions that use the Mod/RM byte
613610
/// to specify a register source, but doesn't use the middle field.
614611
MRMXr = 47,
615-
/// MRM0r-MRM7r - Instructions that operate on a register r/m operand.
612+
/// MRM0r-MRM7r - Instructions that operate on a register r/m operand and use
613+
/// reg field to hold extended opcode, which is represented as /0, /1, ...
616614
MRM0r = 48, // Format /0
617615
MRM1r = 49, // Format /1
618616
MRM2r = 50, // Format /2

0 commit comments

Comments
 (0)