Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: std.Target: Add more architecture tags. #20835

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions lib/std/Target.zig
Original file line number Diff line number Diff line change
Expand Up @@ -979,26 +979,38 @@ pub const Cpu = struct {
};

pub const Arch = enum {
alpha,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alpha technically allows big endian implementations. To my knowledge, no such implementation has ever existed, and no software that supports Alpha supports it in a big endian configuration. So no alphaeb here.

arm,
armeb,
aarch64,
aarch64_be,
aarch64_32,
arc,
arc64,
avr,
bpfel,
bpfeb,
csky,
dxil,
hexagon,
hppa,
hppa64,
kvx,
loongarch32,
loongarch64,
m68k,
microblaze,
microblazeel
microblaze64,
microblaze64el,
mips,
mipsel,
mips64,
mips64el,
moxie,
moxieel,
msp430,
or1k,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenRISC does specify a 64-bit architecture, but no core designs exist for that yet, and no software supports it. In practice, OpenRISC is basically considered a 32-bit architecture, so not adding a 64-bit variant here yet.

powerpc,
powerpcle,
powerpc64,
Expand All @@ -1010,12 +1022,15 @@ pub const Cpu = struct {
sparc64,
sparcel,
s390x,
sh,
sheb,
thumb,
thumbeb,
x86,
x86_64,
xcore,
xtensa,
xtensaeb,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xtensa supports both little and big endian. QEMU supports both, as does GCC.

nvptx,
nvptx64,
spir,
Expand Down
Loading