Commit Graph

155 Commits

Author SHA1 Message Date
Devang Patel f3292b2196 Revert r124611 - "Keep track of incoming argument's location while emitting LiveIns."
In other words, do not keep track of argument's location.  The debugger (gdb) is not prepared to see line table entries for arguments. For the debugger, "second" line table entry marks beginning of function body.
This requires some coordination with debugger to get this working. 
 - The debugger needs to be aware of prolog_end attribute attached with line table entries.
 - The compiler needs to accurately mark prolog_end in line table entries (at -O0 and at -O1+)

llvm-svn: 126155
2011-02-21 23:21:26 +00:00
Oscar Fuentes ba1186c23e Use explicit add_subdirectory's for LLVM target sublibraries instead
of testing for its presence at cmake time.

This way the build automatically regenerates the makefiles when a svn
update brings in a new sublibrary.

llvm-svn: 126068
2011-02-20 02:55:27 +00:00
NAKAMURA Takumi 4c14a5cc2c Triple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 generally.
No one uses *-mingw64. mingw-w64 is represented as {i686|x86_64}-w64-mingw32. In llvm side, i686 and x64 can be treated as similar way.

llvm-svn: 125747
2011-02-17 12:24:17 +00:00
Daniel Dunbar 6619340462 MC/AsmParser: Add support for allowing the conversion process to fail (via
custom conversion functions).

llvm-svn: 124872
2011-02-04 17:12:23 +00:00
Bob Wilson fb0bd049da Fix 80-column violations and whitespace.
llvm-svn: 124819
2011-02-03 21:46:10 +00:00
Devang Patel 56cc5fdf09 Keep track of incoming argument's location while emitting LiveIns.
llvm-svn: 124611
2011-01-31 21:38:14 +00:00
Roman Divacky 36b1b47c5a Introduce virtual ParseRegister method in TargetAsmParser.
Create override of this method in X86/ARM/MBlaze.

llvm-svn: 124378
2011-01-27 17:14:22 +00:00
Rafael Espindola b3eca9bb71 Add support for the --noexecstack option.
llvm-svn: 124077
2011-01-23 17:55:27 +00:00
Rafael Espindola 0e7e34e476 Remove more duplicated code.
llvm-svn: 124056
2011-01-23 04:43:11 +00:00
Rafael Espindola aea4958ea6 Remove duplicated code.
llvm-svn: 124054
2011-01-23 04:28:49 +00:00
Jakob Stoklund Olesen 4bc5e38960 Teach frame lowering to ignore debug values after the terminators.
llvm-svn: 123399
2011-01-13 21:28:52 +00:00
Anton Korobeynikov 5fb942a307 Fix merge fallout
llvm-svn: 123172
2011-01-10 12:56:18 +00:00
Anton Korobeynikov 441ae5b88c Update CMake stuff
llvm-svn: 123171
2011-01-10 12:39:23 +00:00
Anton Korobeynikov 2f93128109 Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs and fixes here and there.
llvm-svn: 123170
2011-01-10 12:39:04 +00:00
Evan Cheng 6eb516dbea Do not model all INLINEASM instructions as having unmodelled side effects.
Instead encode llvm IR level property "HasSideEffects" in an operand (shared
with IsAlignStack). Added MachineInstrs::hasUnmodeledSideEffects() to check
the operand when the instruction is an INLINEASM.

This allows memory instructions to be moved around INLINEASM instructions.

llvm-svn: 123044
2011-01-07 23:50:32 +00:00
Benjamin Kramer 3aa955e906 Remove dead code and silence warnings.
llvm-svn: 122957
2011-01-06 13:01:02 +00:00
Wesley Peck 07fd1efcfa Commit 122778 broke DWARF debug output when using the MBlaze backend. Fixed by overriding TargetFrameInfo::getFrameIndexOffset to take into account the new frame index information.
llvm-svn: 122889
2011-01-05 17:34:20 +00:00
Wesley Peck 6941044c72 Fix more stack layout issues in the MBlaze backend.
llvm-svn: 122778
2011-01-03 21:40:26 +00:00
Wesley Peck 1f289afc25 Fix stack layout error in MBlaze backend.
llvm-svn: 122631
2010-12-29 19:46:28 +00:00
Chris Lattner 2a0a3b43d7 Flag -> Glue, the ongoing saga
llvm-svn: 122513
2010-12-23 18:28:41 +00:00
Wesley Peck ff2cd2ea6c Don't generate carry bit when loading immediate values on the Microblaze.
llvm-svn: 122385
2010-12-22 01:29:32 +00:00
Wesley Peck 3a3a5795c5 Add support for some of the LLVM atomic operations to the MBlaze backend.
llvm-svn: 122384
2010-12-22 01:15:01 +00:00
Wesley Peck 1cd1554ca0 Modeling the carry bit in the MSR register of the MicroBlaze.
llvm-svn: 122381
2010-12-22 00:53:07 +00:00
Wesley Peck 8143c61b91 Fix a regression introduced into the MBlaze delay slot filler.
llvm-svn: 122379
2010-12-22 00:22:59 +00:00
Chris Lattner 3e5fbd74ed rename MVT::Flag to MVT::Glue. "Flag" is a terrible name for
something that just glues two nodes together, even if it is
sometimes used for flags.

llvm-svn: 122310
2010-12-21 02:38:05 +00:00
Wesley Peck ae58e7b179 Teach the MBlaze disassembler to disassemble special purpose registers.
llvm-svn: 122269
2010-12-20 21:18:04 +00:00
Wesley Peck 3307d7cbad Teach the MBlaze asm parser how to parse special purpose register names.
llvm-svn: 122261
2010-12-20 20:43:24 +00:00
Rafael Espindola 8396dd0893 Remove the MCObjectFormat class.
llvm-svn: 122147
2010-12-18 05:37:28 +00:00
Rafael Espindola fdaae0d16f Move some data to the TargetWriter.
llvm-svn: 122134
2010-12-18 03:27:34 +00:00
Benjamin Kramer 292b44baea Pass StringRefs by value, for consistency.
llvm-svn: 122074
2010-12-17 18:19:06 +00:00
Rafael Espindola 6b5e56c2b1 Stub out explicit MCELFObjectTargetWriter interface.
llvm-svn: 122067
2010-12-17 17:45:22 +00:00
Rafael Espindola f0e24d426a Move createELFObjectWriter to its own header.
llvm-svn: 122064
2010-12-17 16:59:53 +00:00
Daniel Dunbar d2867f13a0 MC/Target: Remove HasScatteredSymbols target hook variable, which has been
superceded and was effectively dead.

llvm-svn: 122024
2010-12-17 02:06:08 +00:00
Wesley Peck 266f4092d7 Fix MBlaze backend call instructions so that arguments passed through registers
are correctly marked as used. This removes a hack where the call instructions
marked all possible argument registers as used in the tablegen description.

llvm-svn: 121994
2010-12-16 19:41:31 +00:00
Daniel Dunbar 0c9d9fdd81 MC: Move target specific fixup info descriptors to TargetAsmBackend instead of
the MCCodeEmitter, which seems like a better organization.
 - Also, cleaned up some magic constants while in the area.

llvm-svn: 121953
2010-12-16 03:20:06 +00:00
Wesley Peck 0c558b2080 Lower the MBlaze target specific calling conventions for "interrupt_handler"
and "save_volatiles" correctly. This completes the custom calling convention
functionality changes for the MBlaze backend that were started in 121888.

llvm-svn: 121891
2010-12-15 20:27:28 +00:00
Wesley Peck fdb174b6ef Add some special purpose register definitions to the MBlaze backend and cleanup some old, unused floating point register definitions.
llvm-svn: 121882
2010-12-15 19:35:36 +00:00
Wesley Peck b4f896ce90 Missed some ADDI <-> ADDIK conversions in 121649.
llvm-svn: 121652
2010-12-12 22:53:14 +00:00
Wesley Peck 7d99b5b651 MBlaze delay slot filler was not capable of using ADDK and variants to fill delay slots. This broke several test cases when 121649 was committed. This fixes the regression.
llvm-svn: 121650
2010-12-12 22:22:49 +00:00
Wesley Peck 632b5926d3 The ADD and ADDK (and all variants) instructions where flip-flopped in the MBlaze backend. This bug fix makes 64-bit math work on the MBlaze backend.
llvm-svn: 121649
2010-12-12 22:02:31 +00:00
Wesley Peck 968bc26a0a 1. Change MBlaze indirect branches to use absolute branch BRALD instead of pc relative branch BRLD.
2. Make sure that the MBlaze stack is aligned to 4-byte boundaries.
3. Determine frame indexes that should be placed in the callers stack frame, as per the MBlaze ABI, and place them in the correct locations.

llvm-svn: 121639
2010-12-12 20:52:31 +00:00
Wesley Peck 4c196543f5 Reworking the stack layout generated by the MBlaze backend.
llvm-svn: 121355
2010-12-09 03:42:04 +00:00
Wesley Peck dba03b050f Adding bug fix that was suppose to be part of 121044.
patch contributed by Jack Whitham!

llvm-svn: 121049
2010-12-06 22:19:28 +00:00
Wesley Peck 8da34b6c35 Fixed reversed operands for IDIV and CMP instructions in MBlaze backend.
Use BRAD instead of BRD for indirect branches in MBlaze backend.

patch contributed by Jack Whitham!

llvm-svn: 121044
2010-12-06 22:06:49 +00:00
Wesley Peck 6ce9b60811 Fix a 16-bit immediate value detection bug in the MBlaze delay slot filler.
Address more hazards in the MBlaze delay slot filler.

patch contributed by Jack Whitham!

llvm-svn: 121037
2010-12-06 21:11:01 +00:00
Rafael Espindola 0f30fec0bd Remove the instruction fragment to data fragment lowering since it was causing
freed data to be read. I will open a bug to track it being reenabled.

llvm-svn: 121028
2010-12-06 19:08:48 +00:00
Wesley Peck 11ab8ddf10 Teaching MBlaze backend how to reverse branch conditions.
llvm-svn: 120707
2010-12-02 16:17:11 +00:00
Rafael Espindola 8a3a7923eb Define generic 1, 2 and 4 byte pc relative relocations. They are common
and at least the 4 byte one will be needed to implement the .cfi_* directives.

llvm-svn: 120240
2010-11-28 14:17:56 +00:00
Rafael Espindola bf4a4e4ad9 Remove the unused TheTarget member.
llvm-svn: 120168
2010-11-26 04:24:21 +00:00
Wesley Peck 8ad3b25633 Updating MBlaze .mask and .frame directives to match GCC's output and fixing regression introduced in 120095 by checking MCStreamer::hasRawTextSupport.
llvm-svn: 120097
2010-11-24 16:32:35 +00:00