mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
ccf36de799
Add support for .radix directive, and radix specifiers [yY] (binary), [oOqQ] (octal), and [tT] (decimal). Also, when lexing MASM integers, require radix specifier; MASM requires that all literals without a radix specifier be treated as in the default radix. (e.g., 0100 = 100) Relanding D87400, now with fewer ms-inline-asm tests broken! Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D88337
56 lines
1.3 KiB
Plaintext
56 lines
1.3 KiB
Plaintext
; RUN: not llvm-ml -filetype=asm %s 2>&1 | FileCheck %s --implicit-check-not=error:
|
|
|
|
.code
|
|
|
|
t1:
|
|
; CHECK: :[[# @LINE + 1]]:10: error: invalid decimal number
|
|
mov eax, 120b
|
|
; CHECK: :[[# @LINE + 1]]:10: error: invalid binary number
|
|
mov eax, 120y
|
|
.radix 11
|
|
; CHECK: :[[# @LINE + 1]]:10: error: invalid base-11 number
|
|
mov eax, 120b
|
|
; CHECK: :[[# @LINE + 1]]:10: error: invalid binary number
|
|
mov eax, 120y
|
|
.radix 10
|
|
|
|
t2:
|
|
; CHECK: :[[# @LINE + 1]]:10: error: invalid octal number
|
|
mov eax, 190o
|
|
; CHECK: :[[# @LINE + 1]]:10: error: invalid octal number
|
|
mov eax, 190q
|
|
.radix 13
|
|
; CHECK: :[[# @LINE + 1]]:10: error: invalid octal number
|
|
mov eax, 190o
|
|
; CHECK: :[[# @LINE + 1]]:10: error: invalid octal number
|
|
mov eax, 190q
|
|
.radix 10
|
|
|
|
t3:
|
|
; CHECK: :[[# @LINE + 1]]:10: error: invalid decimal number
|
|
mov eax, 1f0d
|
|
; CHECK: :[[# @LINE + 1]]:10: error: invalid decimal number
|
|
mov eax, 1f0t
|
|
.radix 13
|
|
; CHECK: :[[# @LINE + 1]]:10: error: invalid base-13 number
|
|
mov eax, 1f0d
|
|
; CHECK: :[[# @LINE + 1]]:10: error: invalid decimal number
|
|
mov eax, 1f0t
|
|
.radix 10
|
|
|
|
t4:
|
|
; CHECK: :[[# @LINE + 1]]:10: error: invalid decimal number
|
|
mov eax, 10e
|
|
.radix 16
|
|
.radix 10
|
|
; CHECK: :[[# @LINE + 1]]:10: error: invalid decimal number
|
|
mov eax, 10e
|
|
|
|
t5:
|
|
.radix 9
|
|
; CHECK: :[[# @LINE + 1]]:10: error: invalid base-9 number
|
|
mov eax, 9
|
|
.radix 10
|
|
|
|
END
|