mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
Add a new attribute called 'jumptable' that creates jump-instruction tables for functions marked with this attribute.
It includes a pass that rewrites all indirect calls to jumptable functions to pass through these tables. This also adds backend support for generating the jump-instruction tables on ARM and X86. Note that since the jumptable attribute creates a second function pointer for a function, any function marked with jumptable must also be marked with unnamed_addr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210280 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -947,6 +947,7 @@ bool LLParser::ParseFnAttributeValuePairs(AttrBuilder &B,
|
||||
case lltok::kw_builtin: B.addAttribute(Attribute::Builtin); break;
|
||||
case lltok::kw_cold: B.addAttribute(Attribute::Cold); break;
|
||||
case lltok::kw_inlinehint: B.addAttribute(Attribute::InlineHint); break;
|
||||
case lltok::kw_jumptable: B.addAttribute(Attribute::JumpTable); break;
|
||||
case lltok::kw_minsize: B.addAttribute(Attribute::MinSize); break;
|
||||
case lltok::kw_naked: B.addAttribute(Attribute::Naked); break;
|
||||
case lltok::kw_nobuiltin: B.addAttribute(Attribute::NoBuiltin); break;
|
||||
@@ -1210,6 +1211,7 @@ bool LLParser::ParseOptionalParamAttrs(AttrBuilder &B) {
|
||||
case lltok::kw_alwaysinline:
|
||||
case lltok::kw_builtin:
|
||||
case lltok::kw_inlinehint:
|
||||
case lltok::kw_jumptable:
|
||||
case lltok::kw_minsize:
|
||||
case lltok::kw_naked:
|
||||
case lltok::kw_nobuiltin:
|
||||
@@ -1271,6 +1273,7 @@ bool LLParser::ParseOptionalReturnAttrs(AttrBuilder &B) {
|
||||
case lltok::kw_builtin:
|
||||
case lltok::kw_cold:
|
||||
case lltok::kw_inlinehint:
|
||||
case lltok::kw_jumptable:
|
||||
case lltok::kw_minsize:
|
||||
case lltok::kw_naked:
|
||||
case lltok::kw_nobuiltin:
|
||||
|
||||
Reference in New Issue
Block a user