mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
Resolve endianess at compile time.
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
This commit is contained in:
parent
02542557d7
commit
19b16ffe8b
1 changed files with 1 additions and 1 deletions
|
|
@ -172,7 +172,7 @@ fn call__aeabi_cdcmpxx(comptime func: __aeabi_cdcmpxx, a: f64, b: f64) CPSR {
|
|||
const A: u64 = @bitCast(a);
|
||||
const B: u64 = @bitCast(b);
|
||||
|
||||
const le = builtin.cpu.arch.endian() == .little;
|
||||
const le = comptime builtin.cpu.arch.endian() == .little;
|
||||
const a_lo: u32 = if (le) @truncate(A) else @truncate(A >> 32);
|
||||
const a_hi: u32 = if (le) @truncate(A >> 32) else @truncate(A);
|
||||
const b_lo: u32 = if (le) @truncate(B) else @truncate(B >> 32);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue