Revision b7836db4527e07a07d2415a8780294e9067a1f97 authored by traktofon on 11 April 2017, 20:16:56 UTC, committed by Steven G. Johnson on 11 April 2017, 20:16:56 UTC
It byte-swaps the real and imaginary parts individually, following what Fortran compilers do. The tests read the binary test data from an ad-hoc IOBuffer, because reinterpret doesn't work for complex numbers.
1 parent 64dbcbc
asmvariant.jl
# This file is a part of Julia. License is MIT: http://julialang.org/license
using Base.Test
ix86 = r"i[356]86"
if Sys.ARCH === :x86_64 || ismatch(ix86, string(Sys.ARCH))
function linear_foo()
x = 4
y = 5
end
rgx = r"%"
buf = IOBuffer()
output=""
#test that the string output is at&t syntax by checking for occurrences of '%'s
code_native(buf,linear_foo,(),:att)
output=String(take!(buf))
@test ismatch(rgx,output)
#test that the code output is intel syntax by checking it has no occurrences of '%'
code_native(buf,linear_foo,(),:intel)
output=String(take!(buf))
@test !(ismatch(rgx,output))
code_native(buf,linear_foo,())
output=String(take!(buf))
@test ismatch(rgx, output)
end
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...