summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/Lexer.l
Commit message (Collapse)AuthorAgeFilesLines
* Replace the original flex lexer with a hand writen one. This Chris Lattner2007-11-181-512/+0
| | | | | | | drops a dependency on flex and lets us make future progress more easily. Yay for 2 fewer .cvs files to make silly conflicts with. llvm-svn: 44213
* Add pure/const attributes. Documentation will follow.Anton Korobeynikov2007-11-141-0/+2
| | | | llvm-svn: 44109
* Next PPC long double bits. First cut at constants.Dale Johannesen2007-10-111-1/+1
| | | | | | | | | No compile-time support for constant operations yet, just format transformations. Make readers and writers work. Split constants into 2 doubles in Legalize. llvm-svn: 42865
* Revise previous patch per review comments.Dale Johannesen2007-09-121-6/+6
| | | | | | | Next round of x87 long double stuff. Getting close now, basically works. llvm-svn: 41875
* Add APInt interfaces to APFloat (allows directlyDale Johannesen2007-09-111-3/+57
| | | | | | | | | access to bits). Use them in place of float and double interfaces where appropriate. First bits of x86 long double constants handling (untested, probably does not work). llvm-svn: 41858
* Next round of APFloat changes.Dale Johannesen2007-09-061-2/+4
| | | | | | | | | | | | | | Use APFloat in UpgradeParser and AsmParser. Change all references to ConstantFP to use the APFloat interface rather than double. Remove the ConstantFP double interfaces. Use APFloat functions for constant folding arithmetic and comparisons. (There are still way too many places APFloat is just a wrapper around host float/double, but we're getting there.) llvm-svn: 41747
* Long double, part 1 of N. Support in IR.Dale Johannesen2007-08-031-0/+3
| | | | llvm-svn: 40774
* Don't include newlines in the whitespace before newline (WSNL) rule.Reid Spencer2007-07-311-2/+2
| | | | | | Fix the comment for WSNL to describe its actual function. llvm-svn: 40612
* For PR1553:Reid Spencer2007-07-311-0/+6
| | | | | | | | Make the AsmParser auto-upgrade the old zext and sext keywords for parameter attributes and handle the end-of-line ambiguity. llvm-svn: 40610
* Support for trampolines, except for X86 codegen which isDuncan Sands2007-07-271-0/+1
| | | | | | still under discussion. llvm-svn: 40549
* For PR1553:Reid Spencer2007-07-191-0/+2
| | | | | | | | Change the keywords for the zext and sext parameter attributes to be zeroext and signext so they don't conflict with the keywords for the instructions of the same name. This gets around the ambiguity. llvm-svn: 40069
* Add the byval attributeRafael Espindola2007-07-061-0/+1
| | | | llvm-svn: 37940
* Commit first round work of PR1373. "noalias" is now fully supported inZhou Sheng2007-06-051-0/+1
| | | | | | | VMCore, BitCode, and Assembly. Documentation and test case paramattrs.ll updated also. llvm-svn: 37432
* Don't allow the UnEscape code to read or write beyond the end of yytext.Reid Spencer2007-05-221-11/+20
| | | | | | Make sure we convert \\ into \. llvm-svn: 37293
* Implement full unescaping of escaped hex characters in all quoted identifiersReid Spencer2007-05-221-44/+33
| | | | | | and strings. llvm-svn: 37291
* update commentChris Lattner2007-05-221-1/+1
| | | | llvm-svn: 37282
* simplify codeChris Lattner2007-05-221-11/+2
| | | | llvm-svn: 37280
* Make the %"..." syntax legal for local name. This just makes it symmetricReid Spencer2007-05-191-0/+6
| | | | | | with global names which can already be @"..." llvm-svn: 37257
* Implement protected visibility. This partly implements PR1363. LinkerAnton Korobeynikov2007-04-291-0/+1
| | | | | | should be taught to deal with protected symbols. llvm-svn: 36565
* Implement aliases. This fixes PR1017 and it's dependent bugs. CFE partAnton Korobeynikov2007-04-251-0/+1
| | | | | | will follow. llvm-svn: 36435
* Implement the "thread_local" keyword.Lauro Ramos Venancio2007-04-121-0/+1
| | | | llvm-svn: 35950
* Drop the implementation keyword.Reid Spencer2007-04-091-1/+0
| | | | llvm-svn: 35794
* Give users a grace period on the implementation keyword. This *will* getReid Spencer2007-03-291-1/+1
| | | | | | removed in a few days. llvm-svn: 35472
* Replace the "implementation" keyword with "checkpoint". This more accuratelyReid Spencer2007-03-281-1/+1
| | | | | | | | describes its function as check against unresolved types and definitions. This is handy for forcing error messages in assembly test cases or otherwise ensuring that everything is resolved at that point in the assembly. llvm-svn: 35410
* Add support for the noreturn and nounwind function attributes.Reid Spencer2007-03-221-0/+2
| | | | llvm-svn: 35258
* For PR1245:Reid Spencer2007-03-091-1/+1
| | | | | | | Account for the sign bit when computing the number of bits required for a negative integer literal constant. llvm-svn: 35046
* Implement arbitrary integer constants through the use of APInt values.Reid Spencer2007-02-281-13/+45
| | | | | | | Positive, negative, and hexadecimal integer constants will now return an APInt for values having > 64 bits of precision. llvm-svn: 34715
* Changes to support making the shift instructions be true BinaryOperators.Reid Spencer2007-02-021-5/+7
| | | | | | | | | | | | This feature is needed in order to support shifts of more than 255 bits on large integer types. This changes the syntax for llvm assembly to make shl, ashr and lshr instructions look like a binary operator: shl i32 %X, 1 instead of shl i32 %X, i8 1 Additionally, this should help a few passes perform additional optimizations. llvm-svn: 33776
* Propagate changes from my local tree. This patch includes:Anton Korobeynikov2007-01-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | 1. New parameter attribute called 'inreg'. It has meaning "place this parameter in registers, if possible". This is some generalization of gcc's regparm(n) attribute. It's currently used only in X86-32 backend. 2. Completely rewritten CC handling/lowering code inside X86 backend. Merged stdcall + c CCs and fastcall + fast CC. 3. Dropped CSRET CC. We cannot add struct return variant for each target-specific CC (e.g. stdcall + csretcc and so on). 4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in on first attribute has meaning 'This is hidden pointer to structure return. Handle it gently'. 5. Fixed small bug in llvm-extract + add new feature to FunctionExtraction pass, which relinks all internal-linkaged callees from deleted function to external linkage. This will allow further linking everything together. NOTEs: 1. Documentation will be updated soon. 2. llvm-upgrade should be improved to translate csret => sret. Before this, there will be some unexpected test fails. llvm-svn: 33597
* For PR645:Reid Spencer2007-01-261-26/+33
| | | | | | | | | | | | | | Implement separation of local and global symbols. Local symbols and types now use % prefix. Global variables and functions now use @ prefix. For PR761: Replace: target endian = target pointersize = With: target datalayout = llvm-svn: 33524
* Bye bye bool. AsmWriter doesn't generate it any more so AsmParser shouldn'tReid Spencer2007-01-131-1/+0
| | | | | | read it any more. This is consistent with the new IR as well. llvm-svn: 33181
* * PIC codegen for X86/Linux has been implementedAnton Korobeynikov2007-01-121-0/+1
| | | | | | | | * PIC-aware internal structures in X86 Codegen have been refactored * Visibility (default/weak) has been added * Docs fixes (external weak linkage, visibility, formatting) llvm-svn: 33136
* Integer type names need 1 or more digits, not zero or more.Reid Spencer2007-01-121-1/+1
| | | | llvm-svn: 33116
* For PR1064:Reid Spencer2007-01-121-4/+9
| | | | | | | | | | | | | | | | | | | | | | | Implement the arbitrary bit-width integer feature. The feature allows integers of any bitwidth (up to 64) to be defined instead of just 1, 8, 16, 32, and 64 bit integers. This change does several things: 1. Introduces a new Derived Type, IntegerType, to represent the number of bits in an integer. The Type classes SubclassData field is used to store the number of bits. This allows 2^23 bits in an integer type. 2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and 64-bit integers. These are replaced with just IntegerType which is not a primitive any more. 3. Adjust the rest of LLVM to account for this change. Note that while this incremental change lays the foundation for arbitrary bit-width integers, LLVM has not yet been converted to actually deal with them in any significant way. Most optimization passes, for example, will still only deal with the byte-width integer types. Future increments will rectify this situation. llvm-svn: 33113
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-1/+1
| | | | llvm-svn: 33076
* For PR950:Reid Spencer2006-12-311-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Major reorganization. This patch introduces the signedness changes for the new integer types (i8, i16, i32, i64) which replace the old signed versions (ubyte, sbyte, ushort, short, etc). This patch also implements the function type parameter attributes feature. Together these conspired to introduce new reduce/reduce errors into the grammar. Consequently, it was necessary to introduce a new keyword into the grammar in order to disambiguate. Without this, yacc would make incorrect shift/reduce and reduce/reduce decisions and fail to parse the intended assembly. Changes in assembly: 1. The "implementation" keyword is superfluous but still supported. You can use it as a sentry which will ensure there are no remaining up reference types. However, this is optional as those checks are also performed elsewhere. 2. Parameter attributes are now implemented using an at sign to indicate the attribute. The attributes are placed after the type in a function declaration or after the argument value in a function call. For example: i8 @sext %myfunc(i16 @zext) call i8 @sext %myfunc(i16 @zext %someVal) The facility is available for supporting additional attributes and they can be combined using the @(attr1,attr2,attr3) syntax. Right now the only two supported are @sext and @zext 3. Functions must now be defined with the "define" keyword which is analagous to the "declare" keyword for function declarations. The introduction of this keyword disambiguates situations where a named result type is confused with a new type or gvar definition. For example: %MyType = type i16 %MyType %func(%MyType) { ... } With the introduction of optional parameter attributes between the function name and the function result type, yacc will pick the wrong rule to reduce unless it is disambiguated with "define" before the function definition, as in: define %MyType @zext %func(%MyType %someArg) { ... } llvm-svn: 32781
* For PR950:Reid Spencer2006-12-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Remove all grammar conflicts from assembly parsing. This change involves: 1. Making the "type" keyword not a primitive type (removes several reduce/reduce conflicts) 2. Being more specific about which linkage types are allowed for functions and global variables. In particular "appending" can no longer be specified for a function. A differentiation was made between the various internal and external linkage types. 3. Introduced the "define" keyword which is now required when defining a function. This disambiguates several cases where a named function return type could get confused with the definition of a new type. Using the keyword eliminates all shift/reduce conflicts and the remaining reduce/reduce conflicts. These changes are necessary to implement the function parameter attributes that will be introduced soon. Adding the function parameter attributes in the presence of the shift/reduce and reduce/reduce conflicts led to severe ambiguities that caused the parser to report syntax errors that needed to be resolved. This patch resolves them. llvm-svn: 32770
* For PR950:Reid Spencer2006-12-231-6/+0
| | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. llvm-svn: 32751
* Shorten the FCmp and ICmp mnemonics to 3 letters. Make the parserReid Spencer2006-12-031-28/+20
| | | | | | disambiguate them. llvm-svn: 32151
* Remove backwards compatibility goop. Now implemented in llvm-upgrade.Reid Spencer2006-12-031-31/+44
| | | | llvm-svn: 32144
* Implement signedness caching for values, value lists, constants andReid Spencer2006-11-281-23/+17
| | | | | | | | | | | constant lists. This is just an internal change to the parser in preparation for some backwards compatibility code that is to follow. This will allow things like "uint 4000000000" to retain the unsignedness of the integer constant as the value moves through the parser. In the future, all integer types will be signless but parsing "uint" and friends will be retained for backwards compatibility. llvm-svn: 31964
* For PR950:Reid Spencer2006-11-271-1/+13
| | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. llvm-svn: 31931
* For PR950:Reid Spencer2006-11-191-13/+24
| | | | | | | | | Retain the signedness of the old integer types in a new TypeInfo structure so that it can be used in the grammar to implement auto-upgrade of things that depended on signedness of types. This doesn't implement any new functionality in the AsmParser, its just plumbing for future changes. llvm-svn: 31866
* For PR950:Reid Spencer2006-11-081-1/+3
| | | | | | | | This patch converts the old SHR instruction into two instructions, AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not dependent on the sign of their operands. llvm-svn: 31542
* For PR950:Reid Spencer2006-11-021-1/+4
| | | | | | Replace the REM instruction with UREM, SREM and FREM. llvm-svn: 31369
* For PR950:Reid Spencer2006-10-261-2/+15
| | | | | | | | Make necessary changes to support DIV -> [SUF]Div. This changes llvm to have three division instructions: signed, unsigned, floating point. The bytecode and assembler are bacwards compatible, however. llvm-svn: 31195
* change keyword to datalayoutChris Lattner2006-10-221-1/+1
| | | | llvm-svn: 31108
* Add support for the new "target data" information in .ll files. This providesOwen Anderson2006-10-181-0/+1
| | | | | | | a better encoding of the targets data layout, rather than trying to guess it from the endianness and pointersize like before. llvm-svn: 31030
* Added some eye-candy for Subtarget type checkingAnton Korobeynikov2006-09-171-0/+2
| | | | | | Added X86 StdCall & FastCall calling conventions. Codegen will follow. llvm-svn: 30446
* Adding dllimport, dllexport and external weak linkage types.Anton Korobeynikov2006-09-141-0/+3
| | | | | | | | | DLL* linkages got full (I hope) codegeneration support in C & both x86 assembler backends. External weak linkage added for future use, we don't provide any codegeneration, etc. support for it. llvm-svn: 30374
OpenPOWER on IntegriCloud