mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-02 13:07:32 -06:00
Merge pull request #1683 from kalray/pr-bundle-comment
Handle K1 MPPA VLIW bundles in assembly
This commit is contained in:
+5
-1
@@ -218,7 +218,11 @@ class AsmParser extends AsmRegex {
|
||||
const files = this.parseFiles(asmLines);
|
||||
let prevLabel = "";
|
||||
|
||||
const commentOnly = /^\s*(((#|@|;|\/\/).*)|(\/\*.*\*\/))$/;
|
||||
// Lines matching the following pattern are considered comments:
|
||||
// - starts with '#', '@', '//' or a single ';' (non repeated)
|
||||
// - starts with ';;' and has non-whitespace before end of line
|
||||
const commentOnly = /^\s*(((#|@|\/\/).*)|(\/\*.*\*\/)|(;\s*)|(;[^;].*)|(;;.*\S.*))$/;
|
||||
|
||||
const commentOnlyNvcc = /^\s*(((#|;|\/\/).*)|(\/\*.*\*\/))$/;
|
||||
const sourceTag = /^\s*\.loc\s+(\d+)\s+(\d+).*/;
|
||||
const source6502Dbg = /^\s*\.dbg\s+line,\s*"([^"]+)",\s*(\d+)/;
|
||||
|
||||
Generated
+5
-4
@@ -4,7 +4,7 @@
|
||||
.LC0:
|
||||
.string "%s , %s , %lld , %d , %lld\n"
|
||||
.text
|
||||
|
||||
; This is a comment
|
||||
.align 8
|
||||
.globl toto
|
||||
.type toto, @function
|
||||
@@ -12,6 +12,7 @@ toto:
|
||||
add $r12 = $r12, -16
|
||||
get $r8 = $ra
|
||||
;;
|
||||
;; This is also a comment
|
||||
sw 28[$r12] = $r10
|
||||
add $r10 = $r12, 16
|
||||
;;
|
||||
@@ -40,7 +41,7 @@ toto:
|
||||
add $r12 = $r12, 16
|
||||
;;
|
||||
set $ra = $r1
|
||||
;; /* Can't issue next in the same bundle */
|
||||
;;
|
||||
ret
|
||||
;;
|
||||
.size toto, .-toto
|
||||
@@ -74,7 +75,7 @@ main:
|
||||
sd 16[$r12] = $r0r1
|
||||
make $r1 = .LC1
|
||||
make $r0 = .LC0
|
||||
;; /* Can't issue next in the same bundle */
|
||||
;;
|
||||
call printf
|
||||
;;
|
||||
add $r12 = $r10, -16
|
||||
@@ -88,7 +89,7 @@ main:
|
||||
;;
|
||||
.OTHERDUMMY:
|
||||
set $ra = $r1
|
||||
;; /* Can't issue next in the same bundle */
|
||||
;;
|
||||
ret
|
||||
;;
|
||||
.size main, .-main
|
||||
|
||||
Generated
+5
-4
@@ -1,10 +1,11 @@
|
||||
.LC0:
|
||||
.string "%s , %s , %lld , %d , %lld\n"
|
||||
|
||||
; This is a comment
|
||||
toto:
|
||||
add $r12 = $r12, -16
|
||||
get $r8 = $ra
|
||||
;;
|
||||
;; This is also a comment
|
||||
sw 28[$r12] = $r10
|
||||
add $r10 = $r12, 16
|
||||
;;
|
||||
@@ -33,7 +34,7 @@ toto:
|
||||
add $r12 = $r12, 16
|
||||
;;
|
||||
set $ra = $r1
|
||||
;; /* Can't issue next in the same bundle */
|
||||
;;
|
||||
ret
|
||||
;;
|
||||
|
||||
@@ -59,7 +60,7 @@ main:
|
||||
sd 16[$r12] = $r0r1
|
||||
make $r1 = .LC1
|
||||
make $r0 = .LC0
|
||||
;; /* Can't issue next in the same bundle */
|
||||
;;
|
||||
call printf
|
||||
;;
|
||||
add $r12 = $r10, -16
|
||||
@@ -73,6 +74,6 @@ main:
|
||||
;;
|
||||
.OTHERDUMMY:
|
||||
set $ra = $r1
|
||||
;; /* Can't issue next in the same bundle */
|
||||
;;
|
||||
ret
|
||||
;;
|
||||
|
||||
+5
-4
@@ -1,10 +1,11 @@
|
||||
.LC0:
|
||||
.string "%s , %s , %lld , %d , %lld\n"
|
||||
|
||||
; This is a comment
|
||||
toto:
|
||||
add $r12 = $r12, -16
|
||||
get $r8 = $ra
|
||||
;;
|
||||
;; This is also a comment
|
||||
sw 28[$r12] = $r10
|
||||
add $r10 = $r12, 16
|
||||
;;
|
||||
@@ -33,7 +34,7 @@ toto:
|
||||
add $r12 = $r12, 16
|
||||
;;
|
||||
set $ra = $r1
|
||||
;; /* Can't issue next in the same bundle */
|
||||
;;
|
||||
ret
|
||||
;;
|
||||
|
||||
@@ -59,7 +60,7 @@ main:
|
||||
sd 16[$r12] = $r0r1
|
||||
make $r1 = .LC1
|
||||
make $r0 = .LC0
|
||||
;; /* Can't issue next in the same bundle */
|
||||
;;
|
||||
call printf
|
||||
;;
|
||||
add $r12 = $r10, -16
|
||||
@@ -71,6 +72,6 @@ main:
|
||||
add $r12 = $r12, 16
|
||||
;;
|
||||
set $ra = $r1
|
||||
;; /* Can't issue next in the same bundle */
|
||||
;;
|
||||
ret
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user