summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-06-14 21:08:38 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-06-14 21:08:38 -0700
commit9c749101ef6a6a406221b79c0352f97e29b3787a (patch)
treee48e61daebfd0c7f187e11f30d573feac386bf74 /test
parent503e71d3ee4ef68fa8379b445ba7e928de19db29 (diff)
downloadnasm-9c749101ef6a6a406221b79c0352f97e29b3787a.tar.gz
nasm-9c749101ef6a6a406221b79c0352f97e29b3787a.tar.bz2
nasm-9c749101ef6a6a406221b79c0352f97e29b3787a.zip
Support __utf16__ and __utf32__ in an expression context
Support __utf16__ and __utf32__ in expression contexts.
Diffstat (limited to 'test')
-rw-r--r--test/utf.asm18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/utf.asm b/test/utf.asm
new file mode 100644
index 0000000..3dc8410
--- /dev/null
+++ b/test/utf.asm
@@ -0,0 +1,18 @@
+%define u(x) __utf16__(x)
+%define w(x) __utf32__(x)
+
+ db `Test \u306a\U0001abcd\n`
+ dw u(`Test \u306a\U0001abcd\n`)
+ dd w(`Test \u306a\U0001abcd\n`)
+
+ db `\u306a`
+ db `\xe3\x81\xaa`
+
+ nop
+
+ mov ax,u(`a`)
+ mov bx,u(`\u306a`)
+ mov cx,u(`\xe3\x81\xaa`)
+ mov eax,u(`ab`)
+ mov ebx,u(`\U0001abcd`)
+ mov ecx,w(`\U0001abcd`)