Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ms] [llvm-ml] Allow arbitrary strings as integer constants
MASM interprets strings in expression contexts as integers expressed in big-endian base-256, treating each character as its ASCII representation. This completely eliminates the need to special-case single-character strings. Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D90788
- Loading branch information
Showing
4 changed files
with
77 additions
and
32 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,15 @@ | ||
; RUN: not llvm-ml -filetype=asm %s 2>&1 | FileCheck %s --implicit-check-not=error: | ||
|
||
.code | ||
|
||
oversize_string_test PROC | ||
|
||
mov rax, "abcdefghi" | ||
mov rax, 'abcdefghi' | ||
; CHECK: error: literal value out of range | ||
; CHECK: error: literal value out of range | ||
|
||
ret | ||
oversize_string_test ENDP | ||
|
||
end |