commit 59ae51199ed07b0bf19a2fda61fad77094f1fc7f (tree)
parent 2e3599c7d023ea8649d118de077acb695eb6c264
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Thu, 26 Sep 2024 21:45:49 +0200
std.Target: Return EM_ARC_COMPACT instead of EM_ARC_COMPACT2 for arc.
Also fix an incorrect related comment in start.zig.
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/std/Target.zig b/lib/std/Target.zig
@@ -847,7 +847,7 @@ pub fn toElfMachine(target: Target) std.elf.EM {
return switch (target.cpu.arch) {
.amdgcn => .AMDGPU,
- .arc => .ARC_COMPACT2,
+ .arc => .ARC_COMPACT,
.arm, .armeb, .thumb, .thumbeb => .ARM,
.aarch64, .aarch64_be => .AARCH64,
.avr => .AVR,
diff --git a/lib/std/start.zig b/lib/std/start.zig
@@ -271,8 +271,8 @@ fn _start() callconv(.Naked) noreturn {
\\ b %[posixCallMainAndExit]
,
.arc =>
- // The `arc` tag currently means ARCv2, which has an unusually low stack alignment
- // requirement. ARCv3 increases it from 4 to 16, but we don't support ARCv3 yet.
+ // The `arc` tag currently means ARC v1 and v2, which have an unusually low stack
+ // alignment requirement. ARC v3 increases it from 4 to 16, but we don't support v3 yet.
\\ mov fp, 0
\\ mov blink, 0
\\ mov r0, sp