llvm-project/llvm/test/MC
Rafael Espindola 9f92995781 Don't pass the code model to MC
I was surprised to see the code model being passed to MC. After all,
it assembles code, it doesn't create it.

The one place it is used is in the expansion of .cfi directives to
handle .eh_frame being more that 2gb away from the code.

As far as I can tell, gnu assembler doesn't even have an option to
enable this. Compiling a c file with gcc -mcmodel=large produces a
regular looking .eh_frame. This is probably because in practice linker
parse and recreate .eh_frames.

In llvm this is used because the JIT can place the code and .eh_frame
very far apart. Ideally we would fix the jit and delete this
option. This is hard.

Apart from confusion another problem with the current interface is
that most callers pass CodeModel::Default, which is bad since MC has
no way to map it to the target default if it actually needed to.

This patch then replaces the argument with a boolean with a default
value. The vast majority of users don't ever need to look at it. In
fact, only CodeGen and llvm-mc use it and llvm-mc just to enable more
testing.

llvm-svn: 309884
2017-08-02 20:32:26 +00:00
..
AArch64 [AArch64] Tie source and destination operands for AESMC/AESIMC. 2017-07-29 20:35:28 +00:00
AMDGPU AMDGPU: Add instruction definitions for some scratch_* instructions 2017-07-21 15:36:16 +00:00
ARM [ARM] Unify handling of M-Class system registers 2017-07-19 12:57:16 +00:00
AVR [AVR] Remove a bunch of now-obselete tests 2017-07-01 05:23:13 +00:00
AsmParser [AsmParser][GAS-compatibility] Ignore an empty 'p2align' directive 2017-08-02 17:36:10 +00:00
COFF [codeview] Change readobj symbol dumping format 2017-07-11 23:41:41 +00:00
Disassembler [X86] Add nopq instruction which is a rex encoded version of nopl for gas compatibility. 2017-07-22 01:30:53 +00:00
ELF Don't pass the code model to MC 2017-08-02 20:32:26 +00:00
Hexagon [Hexagon] Handle a global operand to A2_addi when creating duplexes 2017-06-22 15:53:31 +00:00
Lanai [lanai] Add more tests for assembly of conditional ALU ops 2016-07-11 17:58:16 +00:00
MachO IR: Replace the "Linker Options" module flag with "llvm.linker.options" named metadata. 2017-06-12 20:10:48 +00:00
Markup
Mips Revert "Reland "[mips][mt][6/7] Add support for mftr, mttr instructions."" 2017-07-14 15:08:05 +00:00
PowerPC [Power9] Added support for the modsw, moduw, modsd, modud hardware instructions. 2017-06-12 17:58:42 +00:00
Sparc [Sparc] invalid adjustments in TLS_LE/TLS_LDO relocations removed 2017-07-25 15:28:28 +00:00
SystemZ [SystemZ, AsmParser] Enable the mnemonic spell corrector. 2017-07-18 09:17:00 +00:00
WebAssembly [WebAssembly] Expose the offset of each data segment 2017-07-12 00:24:54 +00:00
X86 X86 Asm uses assertions instead of proper diagnostic. This patch fixes that. 2017-07-25 13:05:12 +00:00