Multiply by the binary number 1.00100101,
That doesn't mean it isn't still[too]
crazy to seriously consider.
So if I couldn't figure out a simple way of trivially modifying my
ISA to make it closer to isomorphic with the target architecture, I
could just literally emulate, using actual 360 instructions!
In article <[email protected]>, [email protected] (John Savard) wrote:
So if I couldn't figure out a simple way of trivially modifying my
ISA to make it closer to isomorphic with the target architecture, I
could just literally emulate, using actual 360 instructions!
Dynamic binary translation is _much_ easier than all these contortions of
the ISA.
John
So if I couldn't figure out a simple way of trivially modifying my
ISA to make it closer to isomorphic with the target architecture, I
could just literally emulate, using actual 360 instructions!
At some level of feature cost, it may become preferable to emulate a >feature, or maybe the whole ISA, rather than invest the cost in native >hardware support. Where exactly this line is, depends some on the use-case.
For a more complex ISA with more complex decoding, it may be preferable >simply to emulate it.
On 10/20/2026 2:21 PM, John Dallman wrote:
In article <[email protected]>, [email protected] (John Savard) wrote:
So if I couldn't figure out a simple way of trivially modifying my
ISA to make it closer to isomorphic with the target architecture, I
could just literally emulate, using actual 360 instructions!
Dynamic binary translation is _much_ easier than all these contortions of the ISA.
Yes.
It is one of those things that sometimes isn't given enough credit.
At some level of feature cost, it may become preferable to emulate a feature, or maybe the whole ISA, rather than invest the cost in native hardware support.
Where exactly this line is, depends some on the use-case.
For a more complex ISA with more complex decoding, it may be preferable simply to emulate it.
John
BGB <[email protected]> posted:
At some level of feature cost, it may become preferable to emulate a
feature, or maybe the whole ISA, rather than invest the cost in native
hardware support.
Worked great for Transmeta ...
According to BGB <[email protected]>:
So if I couldn't figure out a simple way of trivially modifying my
ISA to make it closer to isomorphic with the target architecture, I
could just literally emulate, using actual 360 instructions!
At some level of feature cost, it may become preferable to emulate a
feature, or maybe the whole ISA, rather than invest the cost in native
hardware support. Where exactly this line is, depends some on the use-case. >>
For a more complex ISA with more complex decoding, it may be preferable
simply to emulate it.
That sounds a lot like IBM's Millicode they use in their mainframes. The hardware
implements the simple instructions, complex ones run millicode which uses those
instructions plus a few others to access internal registers.
MitchAlsup <[email protected]d> writes:
BGB <[email protected]> posted:
At some level of feature cost, it may become preferable to emulate a
feature, or maybe the whole ISA, rather than invest the cost in native
hardware support.
Worked great for Transmeta ...
That may have to do with the target that they translated to. Intel
and HP could not get this architecture style to perform well on general-purpose programs even when targeting it directly, so why
should it perform well with a dynamic binary translator?
OTOH, it seems to work ok for Apple with Rosetta.
MitchAlsup <[email protected]d> writes:
BGB <[email protected]> posted:That may have to do with the target that they translated to. Intel
At some level of feature cost, it may become preferable to emulate aWorked great for Transmeta ...
feature, or maybe the whole ISA, rather than invest the cost in native
hardware support.
and HP could not get this architecture style to perform well on general-purpose programs even when targeting it directly, so why
should it perform well with a dynamic binary translator?
OTOH, it seems to work ok for Apple with Rosetta.
On 10/22/2026 11:47 AM, Anton Ertl wrote:
OTOH, it seems to work ok for Apple with Rosetta.
Yes.
ARM64 works well here.
There also seems to be some interest in the RISC-V space for dynamic >translation of x86 to RISC-V; though emulating x86 on RISC-V is likely
to lead to a not exactly small number of things that are difficult to >emulate efficiently (EFLAGS being almost kinda evil in some ways; and
then on an ISA that is in some ways rather poorly equipped to try to
fake it).
Anton Ertl [2026-10-22 16:47:35] wrote:
That may have to do with the target that they translated to. Intel
and HP could not get this architecture style to perform well on
general-purpose programs even when targeting it directly, so why
should it perform well with a dynamic binary translator?
OTOH, it seems to work ok for Apple with Rosetta.
I can see 2 important differences:
- Does the ISA you're emulating have an actively developed hardware
implementation against which you're going to have to compete?
- Do you expect to spend 99% of your time emulating a foreign ISA, or do
you expect to mostly run binaries using your native ISA and just
occasionally emulate another?
BGB <[email protected]> writes:
On 10/22/2026 11:47 AM, Anton Ertl wrote:
OTOH, it seems to work ok for Apple with Rosetta.
Yes.
ARM64 works well here.
I think that Apple's *implementations* of ARM A64 (all OoO on the
Macs) work well.
There also seems to be some interest in the RISC-V space for dynamic
translation of x86 to RISC-V; though emulating x86 on RISC-V is likely
to lead to a not exactly small number of things that are difficult to
emulate efficiently (EFLAGS being almost kinda evil in some ways; and
then on an ISA that is in some ways rather poorly equipped to try to
fake it).
The flags are always a problem, and I don't think that ARM A64 has significant advantages over RISC-V here. Yes it has flags of its own,
but the instructions do not set them the same way as AMD64. AMD64 has instructions that sometimes set the flags and sometimes don't, it has instructions that set C and/or V separately from NZP. And AFAIK ARM
A64 has subtract with carry (and corresponding carry handling on
compares), while AMD64 has subtract with borrow; so the meaning of the
carry is inverted between the two after a subtract or compare
instruction, while it agrees after an add instruction.
So the binary translator essentially has to prepare for the worst case
and generate all the AMD64 flags in case they are then used in a way
that the binary translator does not see (e.g., after an indirect
branch), and if the usage is known, can eliminate most or all of this flag-generation code. Pretty much the same for RISC-V.
- anton
Stefan Monnier <[email protected]> writes:
Anton Ertl [2026-10-22 16:47:35] wrote:
That may have to do with the target that they translated to. Intel
and HP could not get this architecture style to perform well on
general-purpose programs even when targeting it directly, so why
should it perform well with a dynamic binary translator?
OTOH, it seems to work ok for Apple with Rosetta.
I can see 2 important differences:
- Does the ISA you're emulating have an actively developed hardware
implementation against which you're going to have to compete?
It's the same ISA in both cases. You could argue that Intel-based
Macs are the only competition for Mac users, but the brand loyalty of
Mac users would be another important difference.
Certainly the Windows on ARM efforts have to compete with Windows
computers running on AMD64 hardware implementations. I read about
slowdowns from binary translation by a factor of 2.
- Do you expect to spend 99% of your time emulating a foreign ISA,
or do
you expect to mostly run binaries using your native ISA and just
occasionally emulate another?
That's an important one. Microsoft tries to get the ISVs of the most
popular software to support ARM A64, and hopes that's enough to
commoditize their complement <https://www.joelonsoftware.com/2002/06/12/strategy-letter-v/>.
Apparently they do not consider the Intel/AMD competition to be enough
for a commodity, or maybe the the reason is that on Intel and AMD
processors Linux commiditizes Windows to some extent; the latter
suggests that the Linux non-compatibility of Windows-on-ARM hardware
is intended (IIRC some Linix hardware company tried to get Linux to
run on the CPUs of the first Windows-on-ARM laptops, but eventually
gave up).
Anyway, the jury is still out on whether Windows on ARM works this
time.
- anton
- Does the ISA you're emulating have an actively developed hardware
implementation against which you're going to have to compete?
- Do you expect to spend 99% of your time emulating a foreign ISA, or do
you expect to mostly run binaries using your native ISA and just
occasionally emulate another?
I refuse to judge. Some purchasers of _some implementations_ of my ISA
may wish to spend 99% of their time emulating one of the foreign ISAs
for which I provide support in my ISA... so by putting it _in_ the
ISA, I offer the implementor the opportunity of emulating it very well >indeed.
MitchAlsup <[email protected]d> writes:
BGB <[email protected]> posted:
At some level of feature cost, it may become preferable to
emulate a feature, or maybe the whole ISA, rather than invest
the cost in native hardware support.
Worked great for Transmeta ...
That may have to do with the target that they translated to. Intel
and HP could not get this architecture style to perform well on general-purpose programs even when targeting it directly, so why
should it perform well with a dynamic binary translator?
OTOH, it seems to work ok for Apple with Rosetta.
On 10/23/2026 2:55 AM, Anton Ertl wrote:
The flags are always a problem, and I don't think that ARM A64 has
significant advantages over RISC-V here. Yes it has flags of its own,
but the instructions do not set them the same way as AMD64. AMD64 has
instructions that sometimes set the flags and sometimes don't, it has
instructions that set C and/or V separately from NZP. And AFAIK ARM
A64 has subtract with carry (and corresponding carry handling on
compares), while AMD64 has subtract with borrow; so the meaning of the
carry is inverted between the two after a subtract or compare
instruction, while it agrees after an add instruction.
The main thing I think would be to have some way to cheaply compute them
and store them away until needed (or restore them from a snapshot state,
do the op, and then snapshot them again).
Potentially, with the snapshots of the non-x86 flags, one could use
these to synthesize the x86 view of the flags if/when they became >architecturally visible in the x86 space (with things like moving bits >around or inverting some bits, etc, being potentially cheaper than fully >faking the flags).
And, then there were instructions that update parts of a register:
ADD AX, CX
XCHG AL, DH
...
That can also be a hassle sometimes.
On Fri, 23 Oct 2026 08:13:07 GMT
[email protected] (Anton Ertl) wrote:
Apparently they do not consider the Intel/AMD competition to be enough
for a commodity, or maybe the the reason is that on Intel and AMD
processors Linux commiditizes Windows to some extent; the latter
suggests that the Linux non-compatibility of Windows-on-ARM hardware
is intended (IIRC some Linix hardware company tried to get Linux to
run on the CPUs of the first Windows-on-ARM laptops, but eventually
gave up).
Was it Arm32 or Arm64?
I can't say that VLIM can never work with general-purpose branchy code,
On 10/23/2026 2:55 AM, Anton Ertl wrote:
I think that Apple's *implementations* of ARM A64 (all OoO on the
Macs) work well.
So, yeah, maybe not so hot then on the A53 or similar in a cheap smartphone?...
Certainly the Windows on ARM efforts have to compete with Windows
computers running on AMD64 hardware implementations. I read about
slowdowns from binary translation by a factor of 2.
That's an important one. Microsoft tries to get the ISVs of the
most popular software to support ARM A64, and hopes that's enough to commoditize their complement
. . . the latter suggests that the Linux non-compatibility of
Windows-on-ARM hardware is intended
BGB <[email protected]> writes:
On 10/22/2026 11:47 AM, Anton Ertl wrote:
OTOH, it seems to work ok for Apple with Rosetta.
Yes.
ARM64 works well here.
I think that Apple's *implementations* of ARM A64 (all OoO on the
Macs) work well.
There also seems to be some interest in the RISC-V space for dynamic >>translation of x86 to RISC-V; though emulating x86 on RISC-V is likely
to lead to a not exactly small number of things that are difficult to >>emulate efficiently (EFLAGS being almost kinda evil in some ways; and
then on an ISA that is in some ways rather poorly equipped to try to
fake it).
The flags are always a problem, and I don't think that ARM A64 has significant advantages over RISC-V here. Yes it has flags of its own,
but the instructions do not set them the same way as AMD64. AMD64 has instructions that sometimes set the flags and sometimes don't, it has instructions that set C and/or V separately from NZP. And AFAIK ARM
A64 has subtract with carry (and corresponding carry handling on
compares), while AMD64 has subtract with borrow; so the meaning of the
carry is inverted between the two after a subtract or compare
instruction, while it agrees after an add instruction.
So the binary translator essentially has to prepare for the worst case
and generate all the AMD64 flags in case they are then used in a way
that the binary translator does not see (e.g., after an indirect
branch), and if the usage is known, can eliminate most or all of this flag-generation code. Pretty much the same for RISC-V.
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,142 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 91:04:28 |
| Calls: | 14,704 |
| Calls today: | 2 |
| Files: | 186,497 |
| D/L today: |
1,888 files (562M bytes) |
| Messages: | 2,551,613 |