Merge pull request #1683 from kalray/pr-bundle-comment

Handle K1 MPPA VLIW bundles in assembly
This commit is contained in:
Matt Godbolt
2019-11-30 16:57:44 -06:00
committed by GitHub
4 changed files with 20 additions and 13 deletions
+5 -1
View File
@@ -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+)/;
+5 -4
View File
@@ -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
+5 -4
View File
@@ -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
View File
@@ -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
;;