2020-02-25 08:43:21 +00:00
|
|
|
const std = @import("std");
|
2017-04-19 19:00:12 +01:00
|
|
|
const tests = @import("tests.zig");
|
|
|
|
|
2018-05-31 15:56:59 +01:00
|
|
|
pub fn addCases(cases: *tests.CompareOutputContext) void {
|
2020-02-25 08:43:21 +00:00
|
|
|
if (std.Target.current.os.tag == .linux and std.Target.current.cpu.arch == .x86_64) {
|
2017-04-19 19:00:12 +01:00
|
|
|
cases.addAsm("hello world linux x86_64",
|
|
|
|
\\.text
|
|
|
|
\\.globl _start
|
|
|
|
\\
|
|
|
|
\\_start:
|
2017-04-30 16:28:11 +01:00
|
|
|
\\ mov $1, %rax
|
|
|
|
\\ mov $1, %rdi
|
|
|
|
\\ mov $msg, %rsi
|
|
|
|
\\ mov $14, %rdx
|
2017-04-19 19:00:12 +01:00
|
|
|
\\ syscall
|
|
|
|
\\
|
2017-04-30 16:28:11 +01:00
|
|
|
\\ mov $60, %rax
|
|
|
|
\\ mov $0, %rdi
|
2017-04-19 19:00:12 +01:00
|
|
|
\\ syscall
|
|
|
|
\\
|
|
|
|
\\.data
|
|
|
|
\\msg:
|
|
|
|
\\ .ascii "Hello, world!\n"
|
|
|
|
, "Hello, world!\n");
|
|
|
|
}
|
|
|
|
}
|