std.Target: Return EM_ARC_COMPACT instead of EM_ARC_COMPACT2 for arc.

Also fix an incorrect related comment in start.zig.
This commit is contained in:
Alex Rønne Petersen 2024-09-26 21:45:49 +02:00
parent 2e3599c7d0
commit 59ae51199e
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -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,

View File

@ -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