back to AT&T syntax for assembly

this reverts 5c04730534.

sadly the quality of the intel dialect in llvm's assembly
parser has many frustrating bugs, and generally has unfortunate
syntax.

the plan is to use AT&T for now since it at least works,
and eventually zig will have its own assembly parser for
x86 and it will be as close to NASM as possible.
This commit is contained in:
Andrew Kelley
2017-04-30 11:28:11 -04:00
parent cbfe4b4bae
commit 29defd705d
6 changed files with 17 additions and 37 deletions

View File

@@ -7,18 +7,17 @@ pub fn addCases(cases: &tests.CompareOutputContext) {
\\.globl _start
\\
\\_start:
\\ mov rax, 1
\\ mov rdi, 1
\\ lea rsi, msg
\\ mov rdx, 14
\\ mov $1, %rax
\\ mov $1, %rdi
\\ mov $msg, %rsi
\\ mov $14, %rdx
\\ syscall
\\
\\ mov rax, 60
\\ mov rdi, 0
\\ mov $60, %rax
\\ mov $0, %rdi
\\ syscall
\\
\\.data
\\
\\msg:
\\ .ascii "Hello, world!\n"
, "Hello, world!\n");