#
a5762816 |
| 26-Jan-2015 |
Eric Christopher <echristo@gmail.com> |
Move the Mips target to storing the ABI in the TargetMachine rather than on MipsSubtargetInfo.
This required a bit of massaging in the MC level to handle this since MC is a) largely a collection of
Move the Mips target to storing the ABI in the TargetMachine rather than on MipsSubtargetInfo.
This required a bit of massaging in the MC level to handle this since MC is a) largely a collection of disparate classes with no hierarchy, and b) there's no overarching equivalent to the TargetMachine, instead only the subtarget via MCSubtargetInfo (which is the base class of TargetSubtargetInfo).
We're now storing the ABI in both the TargetMachine level and in the MC level because the AsmParser and the TargetStreamer both need to know what ABI we have to parse assembly and emit objects. The target streamer has a pointer to the one in the asm parser and is updated when the asm parser is created. This is fragile as the FIXME comment notes, but shouldn't be a problem in practice since we always create an asm parser before attempting to emit object code via the assembler. The TargetMachine now contains the ABI so that the DataLayout can be constructed dependent upon ABI.
All testcases have been updated to use the -target-abi command line flag so that we can set the ABI without using a subtarget feature.
Should be no change visible externally here.
llvm-svn: 227102
show more ...
|
Revision tags: llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2, llvmorg-3.5.1-rc1 |
|
#
c4c202a9 |
| 01-Oct-2014 |
Toma Tabacu <toma.tabacu@imgtec.com> |
[mips] Rename emit and parse functions for the .cpload assembler directive. NFC.
Summary: It's better if we have a consistent name for .cpload-related functions.
Reviewers: dsanders
Reviewed By: d
[mips] Rename emit and parse functions for the .cpload assembler directive. NFC.
Summary: It's better if we have a consistent name for .cpload-related functions.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5437
llvm-svn: 218768
show more ...
|
#
351b2fee |
| 17-Sep-2014 |
Toma Tabacu <toma.tabacu@imgtec.com> |
[mips] Add assembler support for the .set nodsp directive.
Summary: This directive is used to tell the assembler to reject DSP-specific instructions.
Reviewers: dsanders
Reviewed By: dsanders
Dif
[mips] Add assembler support for the .set nodsp directive.
Summary: This directive is used to tell the assembler to reject DSP-specific instructions.
Reviewers: dsanders
Reviewed By: dsanders
Differential Revision: http://reviews.llvm.org/D5142
llvm-svn: 217946
show more ...
|
#
2664779b |
| 09-Sep-2014 |
Toma Tabacu <toma.tabacu@imgtec.com> |
[mips] Add assembler support for .set mips0 directive.
Summary: This directive is used to reset the assembler options to their initial values. Assembly programmers use it in conjunction with the ".s
[mips] Add assembler support for .set mips0 directive.
Summary: This directive is used to reset the assembler options to their initial values. Assembly programmers use it in conjunction with the ".set mipsX" directives.
This patch depends on the .set push/pop directive (http://reviews.llvm.org/D4821).
Contains work done by Matheus Almeida.
Reviewers: dsanders
Reviewed By: dsanders
Differential Revision: http://reviews.llvm.org/D4957
llvm-svn: 217438
show more ...
|
#
9db22db9 |
| 09-Sep-2014 |
Toma Tabacu <toma.tabacu@imgtec.com> |
[mips] Add assembler support for .set push/pop directive.
Summary: These directives are used to save the current assembler options (in the case of ".set push") and restore the previously saved optio
[mips] Add assembler support for .set push/pop directive.
Summary: These directives are used to save the current assembler options (in the case of ".set push") and restore the previously saved options (in the case of ".set pop").
Contains work done by Matheus Almeida.
Reviewers: dsanders
Reviewed By: dsanders
Differential Revision: http://reviews.llvm.org/D4821
llvm-svn: 217432
show more ...
|
Revision tags: llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3 |
|
#
85618b31 |
| 19-Aug-2014 |
Toma Tabacu <toma.tabacu@imgtec.com> |
[mips] Add assembler support for .set arch=x directive.
Summary: This directive is similar to ".set mipsX". It is used to change the CPU target of the assembler, enabling it to accept instructions f
[mips] Add assembler support for .set arch=x directive.
Summary: This directive is similar to ".set mipsX". It is used to change the CPU target of the assembler, enabling it to accept instructions for a specific CPU.
This patch only implements the r4000 CPU (which is treated internally as generic mips3) and the generic ISAs.
Contains work done by Matheus Almeida.
Reviewers: dsanders
Reviewed By: dsanders
Differential Revision: http://reviews.llvm.org/D4884
llvm-svn: 215978
show more ...
|
#
cdb45fa3 |
| 14-Aug-2014 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips] Rename [gs]etCanHaveModuleDir to more natural names
Summary: getCanHaveModuleDir() is renamed to isModuleDirectiveAllowed(), and setCanHaveModuleDir() is renamed to forbidModuleDirective() si
[mips] Rename [gs]etCanHaveModuleDir to more natural names
Summary: getCanHaveModuleDir() is renamed to isModuleDirectiveAllowed(), and setCanHaveModuleDir() is renamed to forbidModuleDirective() since it is only ever given a false argument.
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D4885
llvm-svn: 215628
show more ...
|
#
88f05ce3 |
| 13-Aug-2014 |
Toma Tabacu <toma.tabacu@imgtec.com> |
[mips] Refactor calls to setCanHaveModuleDir.
Summary: Moved some calls to setCanHaveModuleDir to the MipsTargetStreamer base class and removed the resulting empty functions from the MipsTargetELFSt
[mips] Refactor calls to setCanHaveModuleDir.
Summary: Moved some calls to setCanHaveModuleDir to the MipsTargetStreamer base class and removed the resulting empty functions from the MipsTargetELFStreamer class.
Also fixed a missing call to setCanHaveModuleDir in MipsTargetELFStreamer::emitDirectiveSetMicroMips.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: tomatabacu
Differential Revision: http://reviews.llvm.org/D4781
llvm-svn: 215542
show more ...
|
#
d97a634f |
| 13-Aug-2014 |
Daniel Sanders <daniel.sanders@imgtec.com> |
Re-commit: [mips] Implement .ent, .end, .frame, .mask and .fmask.
Patch by Matheus Almeida and Toma Tabacu
The lld test failure on the previous attempt to commit was caused by the addition of the .
Re-commit: [mips] Implement .ent, .end, .frame, .mask and .fmask.
Patch by Matheus Almeida and Toma Tabacu
The lld test failure on the previous attempt to commit was caused by the addition of the .pdr section causing the offsets it was checking to change. This has been fixed by removing the .ent/.end directives from that test since they weren't really needed.
llvm-svn: 215535
show more ...
|
#
b9bc75b6 |
| 11-Aug-2014 |
Daniel Sanders <daniel.sanders@imgtec.com> |
Revert r215359 - [mips] Implement .ent, .end, .frame, .mask and .fmask assembler directives
It seems to cause an lld test (elf/Mips/hilo16-3.test) to fail. Reverted while we investigate.
llvm-svn:
Revert r215359 - [mips] Implement .ent, .end, .frame, .mask and .fmask assembler directives
It seems to cause an lld test (elf/Mips/hilo16-3.test) to fail. Reverted while we investigate.
llvm-svn: 215361
show more ...
|
#
21cf0268 |
| 11-Aug-2014 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips] Implement .ent, .end, .frame, .mask and .fmask assembler directives
Patch by Matheus Almeida and Toma Tabacu
Differential Revision: http://reviews.llvm.org/D4179
llvm-svn: 215359
|
#
44934431 |
| 07-Aug-2014 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips] Add assembler support for .set msa/nomsa directive.
Summary: These directives are used to toggle whether the assembler accepts MSA-specific instructions or not.
Patch by Matheus Almeida and
[mips] Add assembler support for .set msa/nomsa directive.
Summary: These directives are used to toggle whether the assembler accepts MSA-specific instructions or not.
Patch by Matheus Almeida and Toma Tabacu.
Reviewers: dsanders
Reviewed By: dsanders
Differential Revision: http://reviews.llvm.org/D4783
llvm-svn: 215099
show more ...
|
Revision tags: llvmorg-3.5.0-rc2 |
|
#
f0df221d |
| 04-Aug-2014 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips] Add assembler support for '.set mipsX'.
Summary: This patch also fixes an issue with the way the Mips assembler enables/disables architecture features. Before this patch, the assembler never
[mips] Add assembler support for '.set mipsX'.
Summary: This patch also fixes an issue with the way the Mips assembler enables/disables architecture features. Before this patch, the assembler never disabled feature bits. For example, .set mips64 .set mips32r2
would result in the 'OR' of mips64 with mips32r2 feature bits which isn't right. Unfortunately this isn't trivial to fix because there's not an easy way to clear feature bits as the algorithm in MCSubtargetInfo (ToggleFeature) only clears the bits that imply the feature being cleared and not the implied bits by the feature (there's a better explanation to the code I added).
Patch by Matheus Almeida and updated by Toma Tabacu
Reviewers: vmedic, matheusalmeida, dsanders
Reviewed By: dsanders
Subscribers: tomatabacu, llvm-commits
Differential Revision: http://reviews.llvm.org/D4123
llvm-svn: 214709
show more ...
|
Revision tags: llvmorg-3.5.0-rc1 |
|
#
68c3747e |
| 21-Jul-2014 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips] Add MipsOptionRecord abstraction and use it to implement .reginfo/.MIPS.options
This abstraction allows us to support the various records that can be placed in the .MIPS.options section in th
[mips] Add MipsOptionRecord abstraction and use it to implement .reginfo/.MIPS.options
This abstraction allows us to support the various records that can be placed in the .MIPS.options section in the future. We currently use it to record register usage information (the ODK_REGINFO record in our ELF64 spec).
Each .MIPS.options record should subclass MipsOptionRecord and provide an implementation of EmitMipsOptionRecord.
Patch by Matheus Almeida and Toma Tabacu
llvm-svn: 213522
show more ...
|
#
701e9616 |
| 17-Jul-2014 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips] .reginfo is 8 byte aligned on N32.
Differential Revision: http://reviews.llvm.org/D4540
llvm-svn: 213246
|
#
7f70573e |
| 17-Jul-2014 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips] Correct ELF e_flags for the N32 ABI when using a mips-* triple rather than a mips64-* triple
Summary: Generally speaking, mips-* vs mips64-* should not be used to make decisions about the con
[mips] Correct ELF e_flags for the N32 ABI when using a mips-* triple rather than a mips64-* triple
Summary: Generally speaking, mips-* vs mips64-* should not be used to make decisions about the content or format of the ELF. This should be based on the ABI and CPU in use. For example, `mips-linux-gnu-clang -mips64r2 -mabi=64` should produce an ELF64 as should `mips64-linux-gnu-clang -mabi=64`. Conversely, `mips64-linux-gnu-clang -mabi=n32` should produce an ELF32 as should `mips-linux-gnu-clang -mips64r2 -mabi=n32`.
This patch fixes the e_flags but leaves the ELF32 vs ELF64 issue for now since there is no apparent way to base this decision on the ABI and CPU.
Differential Revision: http://reviews.llvm.org/D4539
llvm-svn: 213244
show more ...
|
#
16ec6c19 |
| 17-Jul-2014 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips] Fix ELF e_flags related to -mabicalls and -mplt.
Summary: These options are not implemented yet but we act as if they are always given.
The integrated assembler is driven by the clang driver
[mips] Fix ELF e_flags related to -mabicalls and -mplt.
Summary: These options are not implemented yet but we act as if they are always given.
The integrated assembler is driven by the clang driver so the e_flag test cases should match the e_flags emitted by GCC+GAS rather than GAS by itself.
Differential Revision: http://reviews.llvm.org/D4536
llvm-svn: 213242
show more ...
|
#
41ffa5d1 |
| 14-Jul-2014 |
Daniel Sanders <daniel.sanders@imgtec.com> |
Re-commit: [mips] Correct section alignments and EntrySizes for .bss, .text, .data, .reginfo, .MIPS.options, and .MIPS.abiflags
The lld tests will temporarily fail again but Simon Atanasyan will com
Re-commit: [mips] Correct section alignments and EntrySizes for .bss, .text, .data, .reginfo, .MIPS.options, and .MIPS.abiflags
The lld tests will temporarily fail again but Simon Atanasyan will commit a fix for those shortly.
llvm-svn: 212946
show more ...
|
#
cb0d36e5 |
| 14-Jul-2014 |
Daniel Sanders <daniel.sanders@imgtec.com> |
Revert: [mips] Correct section alignments and EntrySizes for .bss, .text, .data, .reginfo, .MIPS.options, and .MIPS.abiflags
This commit causes multiple lld tests to fail. Reverting while I investig
Revert: [mips] Correct section alignments and EntrySizes for .bss, .text, .data, .reginfo, .MIPS.options, and .MIPS.abiflags
This commit causes multiple lld tests to fail. Reverting while I investigate the issue.
llvm-svn: 212945
show more ...
|
#
8e254166 |
| 14-Jul-2014 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips] Correct section alignments and EntrySizes for .bss, .text, .data, .reginfo, .MIPS.options, and .MIPS.abiflags
Summary: .bss, .text, and .data are at least 16-byte aligned. .reginfo is 4-byte
[mips] Correct section alignments and EntrySizes for .bss, .text, .data, .reginfo, .MIPS.options, and .MIPS.abiflags
Summary: .bss, .text, and .data are at least 16-byte aligned. .reginfo is 4-byte aligned and has a 24-byte EntrySize. .MIPS.abiflags has an 24-byte EntrySize. .MIPS.options is 8-byte aligned and has 1-byte EntrySize.
Using a 1-byte EntrySize for .MIPS.options seems strange because the records are neither 1-byte long nor fixed-length but this matches the value that GAS emits.
Differential Revision: http://reviews.llvm.org/D4487
llvm-svn: 212939
show more ...
|
#
7e527423 |
| 10-Jul-2014 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips] Add support for -modd-spreg/-mno-odd-spreg
Summary: When -mno-odd-spreg is in effect, 32-bit floating point values are not permitted in odd FPU registers. The option also prohibits 32-bit and
[mips] Add support for -modd-spreg/-mno-odd-spreg
Summary: When -mno-odd-spreg is in effect, 32-bit floating point values are not permitted in odd FPU registers. The option also prohibits 32-bit and 64-bit floating point comparison results from being written to odd registers.
This option has three purposes: * It allows support for certain MIPS implementations such as loongson-3a that do not allow the use of odd registers for single precision arithmetic. * When using -mfpxx, -mno-odd-spreg is the default and this allows us to statically check that code is compliant with the O32 FPXX ABI since mtc1/mfc1 instructions to/from odd registers are guaranteed not to appear for any reason. Once this has been established, the user can then re-enable -modd-spreg to regain the use of all 32 single-precision registers. * When using -mfp64 and -mno-odd-spreg together, an O32 extension named O32 FP64A is used as the ABI. This is intended to provide almost all functionality of an FR=1 processor but can also be executed on a FR=0 core with the assistance of a hardware compatibility mode which emulates FR=0 behaviour on an FR=1 processor.
* Added '.module oddspreg' and '.module nooddspreg' each of which update the .MIPS.abiflags section appropriately * Moved setFpABI() call inside emitDirectiveModuleFP() so that the caller doesn't have to remember to do it. * MipsABIFlags now calculates the flags1 and flags2 member on demand rather than trying to maintain them in the same format they will be emitted in.
There is one portion of the -mfp64 and -mno-odd-spreg combination that is not implemented yet. Moves to/from odd-numbered double-precision registers must not use mtc1. I will fix this in a follow-up.
Differential Revision: http://reviews.llvm.org/D4383
llvm-svn: 212717
show more ...
|
#
c7dbc630 |
| 08-Jul-2014 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips] Improve encapsulation of the .MIPS.abiflags implementation and limit scope of related enums
Summary: Follow on to r212519 to improve the encapsulation and limit the scope of the enums.
Also
[mips] Improve encapsulation of the .MIPS.abiflags implementation and limit scope of related enums
Summary: Follow on to r212519 to improve the encapsulation and limit the scope of the enums.
Also merged two very similar parser functions, fixed a bug where ASE's were not being reported, and marked CPR1's as being 128-bit when MSA is enabled.
Differential Revision: http://reviews.llvm.org/D4384
llvm-svn: 212522
show more ...
|
#
fb8a2a95 |
| 08-Jul-2014 |
Vladimir Medic <Vladimir.Medic@imgtec.com> |
Mips.abiflags is a new implicitly generated section that will be present on all new modules. The section contains a versioned data structure which represents essentially information to allow a progr
Mips.abiflags is a new implicitly generated section that will be present on all new modules. The section contains a versioned data structure which represents essentially information to allow a program loader to determine the requirements of the application. This patch implements mips.abiflags section and provides test cases for it.
llvm-svn: 212519
show more ...
|
#
950f48d3 |
| 04-Jul-2014 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips][mips64r6] Set ELF e_flags for MIPS32r6/MIPS64r6. Also do MIPS-I to MIPS-V
Differential Revision: http://reviews.llvm.org/D4386
llvm-svn: 212346
|
#
60890b89 |
| 23-Jun-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
[Mips] Add a target streamer when creating a null streamer.
Should fix DebugInfo/global.ll on the mips bot.
llvm-svn: 211527
|