Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mips] [IAS] Implement the .asciiz directive.
Summary: This directive is exactly the same as .asciz, except it's only used by MIPS. It is used to store null terminated strings in object files. Reviewers: rafael, dsanders, echristo Reviewed By: dsanders, echristo Subscribers: echristo, llvm-commits Differential Revision: http://reviews.llvm.org/D7530 llvm-svn: 235382
- Loading branch information
Toma Tabacu
committed
Apr 21, 2015
1 parent
654af8f
commit 11e14a9
Showing
5 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# RUN: not llvm-mc -triple mips-unknown-linux %s 2>&1 | FileCheck %s | ||
|
||
.asciiz 12 | ||
# CHECK: :[[@LINE-1]]:11: error: expected string in '.asciiz' directive | ||
.asciiz "a"3 | ||
# CHECK: :[[@LINE-1]]:14: error: unexpected token in '.asciiz' directive | ||
.asciiz "a", | ||
# CHECK: :[[@LINE-1]]:15: error: expected string in '.asciiz' directive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# RUN: llvm-mc -triple mips-unknown-linux %s | FileCheck %s | ||
# .asciiz is exactly the same as .asciz, except it's MIPS-specific. | ||
|
||
t1: | ||
.asciiz | ||
# CHECK-LABEL: t1 | ||
|
||
t2: | ||
.asciiz "a" | ||
# CHECK-LABEL: t2 | ||
# CHECK: .byte 97 | ||
# CHECK: .byte 0 | ||
|
||
t3: | ||
.asciiz "a", "b", "c" | ||
# CHECK-LABEL: t3 | ||
# CHECK: .byte 97 | ||
# CHECK: .byte 0 | ||
# CHECK: .byte 98 | ||
# CHECK: .byte 0 | ||
# CHECK: .byte 99 | ||
# CHECK: .byte 0 | ||
|
||
t4: | ||
.asciiz "abcdefghijklmnop" | ||
# CHECK-LABEL: t4 | ||
# CHECK: .ascii "abcdefghijklmnop" | ||
# CHECK: .byte 0 |