These two instructions pop the x87 stack twice which we didn't support
Repurposes the dead pop template argument to be a "pop twice".
Everything else falls down the table flag information comparison
All of the ops that were relying on a 64bit memory offset were being
downgraded to 32bit.
Abuses the XMM_FLAGS option a bit to indicate that it shouldn't
downgrade the 64bit size flag. Which isn't an issue since all these
operations can't encode a register since modrm_r is used for table
decoding
These are being used unconditionally by the steam client (browser?) and
Minit.
Push out the initial implementation without unit tests just to get
further.
Would be nice to figure out why these are using these ops instead of
checking if it is supported.
Based on @phire's idea, Inline constants are constants that can be used as imms in instructions.
This
- Adds OP_INLINECONSTANT to represent them in the IR
- Modifies the ConstProp pass to transform OP_CONSTANT to OP_INLINECONSTANT based on per-platform heuristics
- Modifies the backends to use imms
- Supported opcodes: Add, Sub, Lsl, Lsr, Asr, Ror, Rol
A couple of instructions were incorrectly marked as mem offset.
Fixes the mem offset literal size which is only modified with the
address size modifier.
Previously this was causing these instructions to narrow based on
operand size override incorrectly
RIP Literal isn't actually RIP literal on 32bit, it is RIP absolute.
64bit treats the 32bit as a signed offset, while 32bit treats it as a
32bit unsigned offset
There are a few nice features in C++20 that can make our life easier.
This isn't requiring the full C++20 suite of features, but instead
should allow us to start bringing in features that were at least in
Clang 10.
LLVM 11 came out yesterday (2020-10-12) so it would be a shame to have
that as a minimum requirement.
Java VM uses this to determine if the CPU is new enough to be a 486 or
newer.
Also fixes some comment text.
Java VM scans all the leafs for hypervisor entries
Instead of adding directly which was causing our CPUID map to grow to
1500 entries.
Do the correct CPUID thing and return zeroes for non-understood leafs.
Gives us the same result since we cover almost all leaves with it anyway
This doesn't change behaviour on the 64bit side of things.
Currently the 32bit syscall implementation is "best effort".
Anything that easily maps is passed through, and a few minor ones that
rely on iovec are handled.
Still around 80 syscalls that aren't punched through yet.
Few of these changes could have been split up so it's a bit of a
nightmare.