Fix asm parser to recognize SPARC function definitions (#1998)

Refs #1989
This commit is contained in:
Iain Buclaw
2020-06-08 12:06:40 +02:00
committed by GitHub
parent a6dfc6415d
commit 1f720f3a2f
3 changed files with 26 additions and 1 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ class AsmParser extends AsmRegex {
this.instructionRe = /^\s*[a-zA-Z]+/;
this.identifierFindRe = /[.a-zA-Z_$@][a-zA-z0-9_]*/g;
this.hasNvccOpcodeRe = /^\s*[a-zA-Z|@]/;
this.definesFunction = /^\s*\.(type.*,\s*[@%]function|proc\s+[.a-zA-Z_][a-zA-Z0-9$_.]*:.*)$/;
this.definesFunction = /^\s*\.(type.*,\s*[@%#]function|proc\s+[.a-zA-Z_][a-zA-Z0-9$_.]*:.*)$/;
this.definesGlobal = /^\s*\.globa?l\s*([.a-zA-Z_][a-zA-Z0-9$_.]*)/;
this.indentedLabelDef = /^\s*([.a-zA-Z_$][a-zA-Z0-9$_.]*):/;
this.assignmentDef = /^\s*([.a-zA-Z_$][a-zA-Z0-9$_.]+)\s*=/;
+18
View File
@@ -0,0 +1,18 @@
.file "example.d"
.section ".text"
.align 4
.weak issue1989
.type issue1989, #function
.proc 00
issue1989:
.LFB0:
add %o1, %o0, %o1
mov 0, %g1
cmp %o1, %o0
movg %icc, 1, %g1
jmp %o7+8
mov %g1, %o0
.LFE0:
.size issue1989, .-issue1989
.ident "GCC: (GNU) 9.0.1 20190425 (experimental)"
.section .note.GNU-stack,"",@progbits
+7
View File
@@ -0,0 +1,7 @@
issue1989:
add %o1, %o0, %o1
mov 0, %g1
cmp %o1, %o0
movg %icc, 1, %g1
jmp %o7+8
mov %g1, %o0