3 ms·
Between architectures you'd indeed need quite a few differences, but for the same architecture it'd be nice if things more or less agreed on things. Specifical
by dzaima 5y ago
Between architectures you'd indeed need quite a few differences, but for the same architecture it'd be nice if things more or less agreed on things.
Specifically, I think it'd be very reasonable & possible to have an ABI that has various floats & integers (specified width of course), and pointers & structures, that has consistent conservative padding on all architectures and precisely one way any given structure is laid out in memory (ok, maybe two, with LSB & MSB integers; but I think that's literally all the variation there is (and MSB is nearly dead too)).
Not the most efficient thing on all architectures, but for language inter-communication it shouldn't be too bad to lose a couple nanoseconds here and there, and I'd guess it'd outweigh the alternative of needing more generic (and thus, less optimized) code handling each individually.