@@ -49,62 +49,64 @@ class Triple {
4949  enum  ArchType {
5050    UnknownArch,
5151
52-     arm,            //  ARM (little endian): arm, armv.*, xscale
53-     armeb,          //  ARM (big endian): armeb
54-     aarch64,        //  AArch64 (little endian): aarch64
55-     aarch64_be,     //  AArch64 (big endian): aarch64_be
56-     aarch64_32,     //  AArch64 (little endian) ILP32: aarch64_32
57-     arc,            //  ARC: Synopsys ARC
58-     avr,            //  AVR: Atmel AVR microcontroller
59-     bpfel,          //  eBPF or extended BPF or 64-bit BPF (little endian)
60-     bpfeb,          //  eBPF or extended BPF or 64-bit BPF (big endian)
61-     csky,           //  CSKY: csky
62-     dxil,           //  DXIL 32-bit DirectX bytecode
63-     hexagon,        //  Hexagon: hexagon
64-     loongarch32,    //  LoongArch (32-bit): loongarch32
65-     loongarch64,    //  LoongArch (64-bit): loongarch64
66-     m68k,           //  M68k: Motorola 680x0 family
67-     mips,           //  MIPS: mips, mipsallegrex, mipsr6
68-     mipsel,         //  MIPSEL: mipsel, mipsallegrexe, mipsr6el
69-     mips64,         //  MIPS64: mips64, mips64r6, mipsn32, mipsn32r6
70-     mips64el,       //  MIPS64EL: mips64el, mips64r6el, mipsn32el, mipsn32r6el
71-     msp430,         //  MSP430: msp430
72-     ppc,            //  PPC: powerpc
73-     ppcle,          //  PPCLE: powerpc (little endian)
74-     ppc64,          //  PPC64: powerpc64, ppu
75-     ppc64le,        //  PPC64LE: powerpc64le
76-     r600,           //  R600: AMD GPUs HD2XXX - HD6XXX
77-     amdgcn,         //  AMDGCN: AMD GCN GPUs
78-     riscv32,        //  RISC-V (32-bit): riscv32
79-     riscv64,        //  RISC-V (64-bit): riscv64
80-     sparc,          //  Sparc: sparc
81-     sparcv9,        //  Sparcv9: Sparcv9
82-     sparcel,        //  Sparc: (endianness = little). NB: 'Sparcle' is a CPU variant
83-     systemz,        //  SystemZ: s390x
84-     tce,            //  TCE (http://tce.cs.tut.fi/): tce
85-     tcele,          //  TCE little endian (http://tce.cs.tut.fi/): tcele
86-     thumb,          //  Thumb (little endian): thumb, thumbv.*
87-     thumbeb,        //  Thumb (big endian): thumbeb
88-     x86,            //  X86: i[3-9]86
89-     x86_64,         //  X86-64: amd64, x86_64
90-     xcore,          //  XCore: xcore
91-     xtensa,         //  Tensilica: Xtensa
92-     nvptx,          //  NVPTX: 32-bit
93-     nvptx64,        //  NVPTX: 64-bit
94-     amdil,          //  AMDIL
95-     amdil64,        //  AMDIL with 64-bit pointers
96-     hsail,          //  AMD HSAIL
97-     hsail64,        //  AMD HSAIL with 64-bit pointers
98-     spir,           //  SPIR: standard portable IR for OpenCL 32-bit version
99-     spir64,         //  SPIR: standard portable IR for OpenCL 64-bit version
100-     spirv,          //  SPIR-V with logical memory layout.
101-     spirv32,        //  SPIR-V with 32-bit pointers
102-     spirv64,        //  SPIR-V with 64-bit pointers
103-     kalimba,        //  Kalimba: generic kalimba
104-     shave,          //  SHAVE: Movidius vector VLIW processors
105-     lanai,          //  Lanai: Lanai 32-bit
106-     wasm32,         //  WebAssembly with 32-bit pointers
107-     wasm64,         //  WebAssembly with 64-bit pointers
52+     arm,         //  ARM (little endian): arm, armv.*, xscale
53+     armeb,       //  ARM (big endian): armeb
54+     aarch64,     //  AArch64 (little endian): aarch64
55+     aarch64_be,  //  AArch64 (big endian): aarch64_be
56+     aarch64_32,  //  AArch64 (little endian) ILP32: aarch64_32
57+     arc,         //  ARC: Synopsys ARC
58+     avr,         //  AVR: Atmel AVR microcontroller
59+     bpfel,       //  eBPF or extended BPF or 64-bit BPF (little endian)
60+     bpfeb,       //  eBPF or extended BPF or 64-bit BPF (big endian)
61+     csky,        //  CSKY: csky
62+     dxil,        //  DXIL 32-bit DirectX bytecode
63+     hexagon,     //  Hexagon: hexagon
64+     loongarch32, //  LoongArch (32-bit): loongarch32
65+     loongarch64, //  LoongArch (64-bit): loongarch64
66+     m68k,        //  M68k: Motorola 680x0 family
67+     mips,        //  MIPS: mips, mipsallegrex, mipsr6
68+     mipsel,      //  MIPSEL: mipsel, mipsallegrexe, mipsr6el
69+     mips64,      //  MIPS64: mips64, mips64r6, mipsn32, mipsn32r6
70+     mips64el,    //  MIPS64EL: mips64el, mips64r6el, mipsn32el, mipsn32r6el
71+     msp430,      //  MSP430: msp430
72+     ppc,         //  PPC: powerpc
73+     ppcle,       //  PPCLE: powerpc (little endian)
74+     ppc64,       //  PPC64: powerpc64, ppu
75+     ppc64le,     //  PPC64LE: powerpc64le
76+     r600,        //  R600: AMD GPUs HD2XXX - HD6XXX
77+     amdgcn,      //  AMDGCN: AMD GCN GPUs
78+     riscv32,     //  RISC-V (32-bit, little endian): riscv32
79+     riscv64,     //  RISC-V (64-bit, little endian): riscv64
80+     riscv32be,   //  RISC-V (32-bit, big endian): riscv32be
81+     riscv64be,   //  RISC-V (64-bit, big endian): riscv64be
82+     sparc,       //  Sparc: sparc
83+     sparcv9,     //  Sparcv9: Sparcv9
84+     sparcel,     //  Sparc: (endianness = little). NB: 'Sparcle' is a CPU variant
85+     systemz,     //  SystemZ: s390x
86+     tce,         //  TCE (http://tce.cs.tut.fi/): tce
87+     tcele,       //  TCE little endian (http://tce.cs.tut.fi/): tcele
88+     thumb,       //  Thumb (little endian): thumb, thumbv.*
89+     thumbeb,     //  Thumb (big endian): thumbeb
90+     x86,         //  X86: i[3-9]86
91+     x86_64,      //  X86-64: amd64, x86_64
92+     xcore,       //  XCore: xcore
93+     xtensa,      //  Tensilica: Xtensa
94+     nvptx,       //  NVPTX: 32-bit
95+     nvptx64,     //  NVPTX: 64-bit
96+     amdil,       //  AMDIL
97+     amdil64,     //  AMDIL with 64-bit pointers
98+     hsail,       //  AMD HSAIL
99+     hsail64,     //  AMD HSAIL with 64-bit pointers
100+     spir,        //  SPIR: standard portable IR for OpenCL 32-bit version
101+     spir64,      //  SPIR: standard portable IR for OpenCL 64-bit version
102+     spirv,       //  SPIR-V with logical memory layout.
103+     spirv32,     //  SPIR-V with 32-bit pointers
104+     spirv64,     //  SPIR-V with 64-bit pointers
105+     kalimba,     //  Kalimba: generic kalimba
106+     shave,       //  SHAVE: Movidius vector VLIW processors
107+     lanai,       //  Lanai: Lanai 32-bit
108+     wasm32,      //  WebAssembly with 32-bit pointers
109+     wasm64,      //  WebAssembly with 64-bit pointers
108110    renderscript32, //  32-bit RenderScript
109111    renderscript64, //  64-bit RenderScript
110112    ve,             //  NEC SX-Aurora Vector Engine
@@ -1064,10 +1066,14 @@ class Triple {
10641066  }
10651067
10661068  // / Tests whether the target is 32-bit RISC-V.
1067-   bool  isRISCV32 () const  { return  getArch () == Triple::riscv32; }
1069+   bool  isRISCV32 () const  {
1070+     return  getArch () == Triple::riscv32 || getArch () == Triple::riscv32be;
1071+   }
10681072
10691073  // / Tests whether the target is 64-bit RISC-V.
1070-   bool  isRISCV64 () const  { return  getArch () == Triple::riscv64; }
1074+   bool  isRISCV64 () const  {
1075+     return  getArch () == Triple::riscv64 || getArch () == Triple::riscv64be;
1076+   }
10711077
10721078  // / Tests whether the target is RISC-V (32- and 64-bit).
10731079  bool  isRISCV () const  { return  isRISCV32 () || isRISCV64 (); }
0 commit comments