Live data from Hacker News

Ask HN: Is big-endian dead?

news.ycombinator.com

21–30 of 193 posts

Re: Ask HN: Is big-endian dead?

#22
post #19
post #15

Earlier quoted context omitted.

Your scheme to byteswap little endian in hex displays falls over in the face of differing word sizes.

Not at all, you just list the whole dump right-to-left. Then it works out regardless of word size.

So the dump is ordered backwards, from top of memory to bottom? That seems harder for humans than little endian integers.

Re: Ask HN: Is big-endian dead?

#23

Eh, haswell added the movbe instructions. And I wouldn't be surprised if someone in the RISCV world added big endian instructions (they're nice for network processing). And nearly every powerpc I've seen is big endian, FWIW.

Those are for fast I/O, but they don't change the architecture.

Re: Ask HN: Is big-endian dead?

#24

I think a couple of networking chips still use it.

I remember reading somewhere that BE was chosen for IP partly for routing efficiency. As you go from MSB to LSB in an IP address you narrow in on an increasingly specific network segment. That's probably not true anymore as smaller and smaller blocks of IPv4 addresses have been handed out (e.g. instead of a full class C).

Re: Ask HN: Is big-endian dead?

#25
post #3

Earlier quoted context omitted.

Big-endian is the canonical form for storage and the wire because back when the Internet was designed most "pro" machines were big-endian: Sparc, old MIPS, old PPC, DEC Alpha, etc. All these are dead or dying now. It's easy enough to deal with BE files and protocols by just swapping bytes. I'm referring to hardware architectures. Are there still any big-endian chips out there? Does it still make sense to support big-…

Small pedantic correction from a former Alpha kernel hacker: DEC Alpha was Big Endian only for some rare Cray systems. Everything else was Little Endian.

I'm interested to know what you worked on on Alpha.

Re: Ask HN: Is big-endian dead?

#26
Big Endian is still supported natively on POWER8/9

Intel added movBE (mov big endian) support in BM2 extension.

Networks are still Big Endian.

SPARC chips (and now RISC-V) are BIG Endian by default.

MIPS just became an independent company a few days ago and they have native Big Endian support.

Edit 1: I was wrong about Power8/9 LE/BE

Re: Ask HN: Is big-endian dead?

#27
The 24-bit virtual machine I'm working on is little endian. The 'processor' reads instructions and addressess in little endian and instructions are stored in memory in little endian. But when programming it, using assembly, values and addresses are written with the least significant byte on the furthest right to make it easier for people to understand. At least so far. I may change it if it ends up being confusing.

Re: Ask HN: Is big-endian dead?

#28
post #22
post #19

Earlier quoted context omitted.

Not at all, you just list the whole dump right-to-left. Then it works out regardless of word size.

So the dump is ordered backwards, from top of memory to bottom? That seems harder for humans than little endian integers.

I don't understand what you mean. Line breaks can be inserted where ever suitable. Whether the bytes are listed left-to-right or right-to-left makes no difference.

Re: Ask HN: Is big-endian dead?

#29

Big Endian is still supported natively on POWER8/9 Intel added movBE (mov big endian) support in BM2 extension. Networks are still Big Endian. SPARC chips (and now RISC-V) are BIG Endian by default. MIPS just became an independent company a few days ago and they have native Big Endian support. Edit 1: I was wrong about Power8/9 LE/BE

Recent Linux supports both endiannesses for PPC. ppc64le was added recently.

RISC-V is little endian.

Re: Ask HN: Is big-endian dead?

#30

Big Endian is still supported natively on POWER8/9 Intel added movBE (mov big endian) support in BM2 extension. Networks are still Big Endian. SPARC chips (and now RISC-V) are BIG Endian by default. MIPS just became an independent company a few days ago and they have native Big Endian support. Edit 1: I was wrong about Power8/9 LE/BE

If you use Linux on POWER you're forced to use Big Endian mode as the faster Little Endian mode (according to marketting) is reserved for IBM's operating systems.

That's not correct. Ubuntu is LE only and it looks like RHEL is also switching from BE to LE.

"The base RISC-V ISA has a little-endian memory system, but non-standard variants can provide a big-endian..."

SPARC and MIPS are dead.

Post reply on HN