mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-01 10:26:08 -06:00
Fix asm parser to recognize SPARC function definitions (#1998)
Refs #1989
This commit is contained in:
+1
-1
@@ -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*=/;
|
||||
|
||||
Generated
+18
@@ -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
@@ -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
|
||||
Reference in New Issue
Block a user