summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/AsmParser
Commit message (Collapse)AuthorAgeFilesLines
...
* Teach the x86 mc assembler that %dr6 = %db6, this implementsChris Lattner2010-06-242-0/+54
| | | | | | rdar://8013734 llvm-svn: 106725
* more cleanupsChris Lattner2010-06-241-21/+15
| | | | llvm-svn: 106724
* reduce indentationChris Lattner2010-06-241-20/+15
| | | | llvm-svn: 106723
* Add tests for different AVX cmp opcodes, also teach the x86 asm parser to ↵Bruno Cardoso Lopes2010-06-231-6/+8
| | | | | | understand the vcmp instruction llvm-svn: 106678
* Incremental improvement to the handling of the x86 "Jump if rCX Zero"Kevin Enderby2010-06-081-0/+14
| | | | | | | | | | | | instruction. Added the 64-bit version "jrcxz" so it is recognized and also added the checks for incorrect uses of "jcxz" in 64-bit mode and "jrcxz" in 32-bit mode. Still to do is to correctly handle the encoding of the instruction adding the Address-size override prefix byte, 0x67, when the width of the count register is not the same as the mode the machine is running in. Which for example means the encoding of "jecxz" depends if you are assembling as a 32-bit target or a 64-bit target. llvm-svn: 105661
* MC/X86: Add alias for movzx.Kevin Enderby2010-05-281-0/+1
| | | | llvm-svn: 105005
* MC/X86: Add alias for fwait.Kevin Enderby2010-05-281-0/+1
| | | | llvm-svn: 105001
* MC/X86: Add aliases for Jcc variants.Kevin Enderby2010-05-271-0/+13
| | | | llvm-svn: 104890
* Changed the encoding of X86 floating point stack operations where both operandsKevin Enderby2010-05-251-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | are st(0). These can be encoded using an opcode for storing in st(0) or using an opcode for storing in st(i), where i can also be 0. To allow testing with the darwin assembler and get a matching binary the opcode for storing in st(0) is now used. To do this the same logical trick is use from the darwin assembler in converting things like this: fmul %st(0), %st into this: fmul %st(0) by looking for the second operand being X86::ST0 for specific floating point mnemonics then removing the second X86::ST0 operand. This also has the add benefit to allow things like: fmul %st(1), %st that llvm-mc did not assemble. llvm-svn: 104634
* MC/X86: Add a hack to allow recognizing 'cmpltps' and friends.Daniel Dunbar2010-05-251-1/+36
| | | | llvm-svn: 104626
* MC/X86: Add aliases for CMOVcc variants.Kevin Enderby2010-05-241-0/+14
| | | | llvm-svn: 104549
* MC/X86: Subdivide immediates a bit more, so that we properly recognize ↵Daniel Dunbar2010-05-221-29/+56
| | | | | | | | | | | immediates based on the width of the target instruction. For example: addw $0xFFFF, %ax should match the same as addw $-1, %ax but we used to match it to the longer encoding. llvm-svn: 104453
* MC/X86: Add alias for setz, setnz, jz, jnz.Daniel Dunbar2010-05-221-0/+4
| | | | llvm-svn: 104435
* Added retl for 32-bit x86 and added retq for 64-bit x86.Kevin Enderby2010-05-211-0/+2
| | | | llvm-svn: 104394
* X86: Model i64i32imm properly, as a subclass of all immediates.Daniel Dunbar2010-05-201-0/+20
| | | | llvm-svn: 104272
* Fix assembly parsing and encoding of the pushf and popf family ofDan Gohman2010-05-201-0/+17
| | | | | | instructions. llvm-svn: 104231
* reapply r103668 with a fix. Never make "minor syntax changes"Chris Lattner2010-05-131-0/+33
| | | | | | after testing before committing. llvm-svn: 103681
* revert r103668 for now, it is apparently breaking things.Chris Lattner2010-05-121-33/+0
| | | | llvm-svn: 103677
* moffset forms of moves are x86-32 only, make the parserChris Lattner2010-05-121-0/+33
| | | | | | | | lower them to the correct x86-64 instructions since we don't have a clean way to handle this in td files yet. rdar://7947184 llvm-svn: 103668
* MC/X86: Extend suffix matching hack to match 'q' suffix.Daniel Dunbar2010-05-121-1/+3
| | | | llvm-svn: 103535
* MC/X86: Chris pointed that 'as' isn't consistent in accepting the long form ofDaniel Dunbar2010-05-041-5/+0
| | | | | | | | | | | | | | | instructions which have no direct register usage. Darwin 'as' accepts: add $0, (%rax) but rejects mov $0, (%rax) for example. Given that, only accept suffix matches which match exactly one form. We still need to emit nice diagnostics for failures... llvm-svn: 103015
* MC/X86: Add "support" for matching ATT style mnemonic prefixes.Daniel Dunbar2010-05-041-2/+63
| | | | | | | | | | | | | | | | | - The idea is that when a match fails, we just try to match each of +'b', +'w', +'l'. If exactly one matches, we assume this is a mnemonic prefix and accept it. If all match, we assume it is width generic, and take the 'l' form. - This would be a horrible hack, if it weren't so simple. Therefore it is an elegant solution! Chris gets the credit for this particular elegant solution. :) - Next step to making this more robust is to have the X86 matcher generate the mnemonic prefix information. Ideally we would also compute up-front exactly which mnemonic to attempt to match, but this may require more custom code in the matcher than is really worth it. llvm-svn: 103012
* teach the x86 asm parser how to handle segment prefixesChris Lattner2010-04-171-12/+17
| | | | | | in memory operands. rdar://7874844 llvm-svn: 101661
* MC/X86: Fix an MCOperand link, when we parsing shrld $1,%eax and friends; I ↵Daniel Dunbar2010-03-201-1/+3
| | | | | | believe this fixes the last memory leaks under test/MC. llvm-svn: 99102
* MC/X86/AsmMatcher: Use the new instruction cleanup routine to implement aDaniel Dunbar2010-03-181-3/+42
| | | | | | | | temporary workaround for matching inc/dec on x86_64 to the correct instruction. - This hack will eventually be replaced with a robust mechanism for handling matching instructions based on the available target features. llvm-svn: 98858
* MC/X86: Add temporary hack to match shrl $1,%eax correctly, to support testingDaniel Dunbar2010-03-131-0/+9
| | | | | | other functionality on 403.gcc compiled at -O0. llvm-svn: 98405
* Fix LLVM build when the user specifies CPPFLAGS on the make command line.Jeffrey Yasskin2010-03-121-1/+1
| | | | llvm-svn: 98394
* MC/X86: Push immediate operands as immediates not expressions when possible.Daniel Dunbar2010-02-131-4/+12
| | | | llvm-svn: 96055
* MC/X86 AsmMatcher: Fix a use after free spotted by d0k, and de-XFAILDaniel Dunbar2010-02-101-18/+15
| | | | | | x86_32-encoding.s in on expectation of it passing. llvm-svn: 95806
* Implement x86 asm parsing support for %st and %st(4)Chris Lattner2010-02-091-0/+35
| | | | llvm-svn: 95634
* pass stringref by value instead of by const&Chris Lattner2010-02-092-2/+3
| | | | llvm-svn: 95627
* Fixed the AT&T AsmLexer to report the proper stringsSean Callanan2010-02-081-1/+1
| | | | | | | | for register tokens. Before, if it encountered '%al,' it would report 'al,' as the token. Now it correctly reports '%al'. llvm-svn: 95594
* Added support for X86 instruction prefixes so llvm-mc can assemble them. TheKevin Enderby2010-02-031-2/+12
| | | | | | | | | | Lock prefix, Repeat string operation prefixes and the Segment override prefixes. Also added versions of the move string and store string instructions without the repeat prefixes to X86InstrInfo.td. And finally marked the rep versions of move/store string records in X86InstrInfo.td as isCodeGenOnly = 1 so tblgen is happy building the disassembler files. llvm-svn: 95252
* AsmParser/X86: Add temporary hack to allow parsing "sal". Eventually we needDaniel Dunbar2010-02-021-2/+8
| | | | | | | some mechanism for specifying alternative syntaxes, but I'm not sure what form that should take yet. llvm-svn: 95158
* MCAsmParser/X86: Represent absolute memory operands as CodeGen does, with scaleDaniel Dunbar2010-02-021-2/+2
| | | | | | == 1. llvm-svn: 95137
* Moved InstallLexer() from the X86-specific AsmLexerSean Callanan2010-01-311-8/+3
| | | | | | | | to the TargetAsmLexer class so that clients can actually use the TargetAsmLexer they get from a Target. llvm-svn: 94940
* MC/X86 AsmParser: Handle absolute memory operands correctly. We were doingDaniel Dunbar2010-01-301-5/+27
| | | | | | | | | | | | something totally broken and parsing them as immediates, but the .td file also had the wrong match class so things sortof worked. Except, that is, that we would parse movl $0, %eax as movl 0, %eax Feel free to guess how well that worked. llvm-svn: 94869
* AsmMatcher/X86: Separate out sublass for memory operands that have no segmentDaniel Dunbar2010-01-301-4/+14
| | | | | | register, and use to cleanup a FIXME in X86AsmParser.cpp. llvm-svn: 94859
* Unbreak MSVC/CMake build.Daniel Dunbar2010-01-261-1/+1
| | | | llvm-svn: 94502
* Added the implementation of the Intel-specificSean Callanan2010-01-261-1/+27
| | | | | | TargetAsmLexer. llvm-svn: 94482
* Added the TargetAsmLexer implementation for AT&T syntax.Sean Callanan2010-01-261-5/+70
| | | | llvm-svn: 94479
* Implemented the dialect decision logic for the X86Sean Callanan2010-01-251-2/+20
| | | | | | | | TargetAsmLexer. Dialect-specific lexing code will be placed in the functions LexTokenATT() and LexTokenIntel(). llvm-svn: 94456
* make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.Chris Lattner2010-01-241-1/+0
| | | | llvm-svn: 94378
* fix a parsing problem on instructions like:Chris Lattner2010-01-241-2/+2
| | | | | | | | movw $8, (_cost_table_-L97$pb)+66(%eax) After the parens, we could still have a binop. llvm-svn: 94345
* Update CMake build.Ted Kremenek2010-01-231-0/+1
| | | | llvm-svn: 94278
* Added the skeleton for the implementation of the X86Sean Callanan2010-01-232-0/+46
| | | | | | | target-specific AsmLexer, and added the appropriate registration calls. llvm-svn: 94275
* Modified the register matcher function in AsmMatcher toSean Callanan2010-01-231-4/+6
| | | | | | | | | | | be static. Also made it possible for clients to get it and no other functions from ...GenAsmMatcher.inc by defining REGISTERS_ONLY before including GenAsmMatcher.inc. This sets the stage for target-specific lexers that can identify registers and return AsmToken::Register as appropriate. llvm-svn: 94266
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-221-0/+1
| | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. llvm-svn: 94164
* create a new MCParser library and move some stuff into it.Chris Lattner2010-01-221-3/+3
| | | | llvm-svn: 94129
* Promoted the getTok() method to MCAsmParser so thatSean Callanan2010-01-191-11/+11
| | | | | | | the two token accessor functions are declared consistently. Modified the clients of MCAsmParser to reflect this change. llvm-svn: 93916
OpenPOWER on IntegriCloud