mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
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) { ... } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32781 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
Analysis | ||
Archive | ||
AsmParser | ||
Bytecode | ||
CodeGen | ||
Debugger | ||
ExecutionEngine | ||
Linker | ||
Support | ||
System | ||
Target | ||
Transforms | ||
VMCore | ||
Makefile |