Commit graph

3161 commits

Author SHA1 Message Date
Merry
da2b1c5724 a32_get_set_elimination_pass: Convert NZ to NZC 2022-07-20 16:45:14 +01:00
Merry
6f106602ba a32_get_set_elimination_pass: Add option to disable NZC -> NZ conversion 2022-07-20 16:42:39 +01:00
Merry
52aa68c31c backend/x64: Fixup NZ flag emission 2022-07-20 14:58:28 +01:00
Merry
b97147e187 a32_get_set_elimination_pass: Reduce NZC to 00C 2022-07-20 14:44:33 +01:00
Merry
03dcc3fa50 a32_get_set_elimination_pass: Reduce NZC to NZ where possible 2022-07-20 14:08:41 +01:00
Merry
cf08130f2c A32: Condense flag handling
Remove individual flag handlers, and handle them in chuks where able, to produce more optimal code.
2022-07-19 22:05:13 +01:00
Merry
2e1ab36240 microinstruction: Also track MostSignificantBit and IsZero{32,64} as pseudoops 2022-07-19 22:02:56 +01:00
Merry
ac19912fe7 microinstruction: Optimize storage of associated pseudooperation 2022-07-19 22:02:18 +01:00
Merry
91d1f944e3 6.2.1 2022-07-17 22:42:56 +01:00
Merry
0050a6abe1 github: Add -Wp,-D_GLIBCXX_ASSERTIONS to CXXFLAGS 2022-07-17 22:42:56 +01:00
Merry
51a89dbb7a A64CallbackConfigPass: Ensure IR instructions emitted by this pass have correct location descriptors attached 2022-07-17 22:42:56 +01:00
Merry
4e89756169 Squashed 'externals/oaknut/' changes from c2cb5ec49..c0c715505
c0c715505 oaknut: pragma once

git-subtree-dir: externals/oaknut
git-subtree-split: c0c715505020e69e3acbd959cbfe112083f292b5
2022-07-16 20:28:26 +01:00
Merry
786161b416 externals: Update oaknut
Merge commit '4e8975616946b89c53533549c0d3bab4d0dc9653'
2022-07-16 20:28:26 +01:00
Merry
da5d06c32a backend/x64: Remove unused member halt_requested from StackLayout 2022-07-15 15:19:01 +01:00
Merry
1f0a43753e 6.2.0 2022-07-15 09:30:49 +01:00
Merry
a10070578d README: Update licenses 2022-07-14 22:14:44 +01:00
Merry
e9b550de3a fuzz_arm: Correct unicorn overrun recovery code 2022-07-14 12:30:53 +01:00
Merry
840982be95 block_of_code: Remove far code machinery 2022-07-14 08:58:00 +01:00
Merry
dd60f4b7d8 emit_x64_memory: Use deferred emits 2022-07-14 08:58:00 +01:00
Merry
0d1e4fc4a8 a32_emit_x64: Remove use of far code from EmitTerminalImpl LinkBlock 2022-07-14 08:58:00 +01:00
Merry
36f6114559 emit_x64_vector_floating_point: Use deferred emits 2022-07-14 08:58:00 +01:00
Merry
7d5e078baa emit_x64_floating_point: MSVC fixup 2022-07-14 08:58:00 +01:00
Merry
11ba75b7f0 emit_x64_floating_point: Use deferred emits 2022-07-14 08:58:00 +01:00
Merry
6c38ed8a89 emit_x86: Introduce the concept of deferred emits
Remove the concept of the far code region
2022-07-14 08:58:00 +01:00
Merry
b6ddeeea0f Implement memory aborts 2022-07-13 12:38:03 +01:00
Merry
285e617e35 Revert "frontend: Add option to halt after memory accesses (#682)"
This reverts commit 5ad1d02351.
2022-07-13 12:34:37 +01:00
Merry
04cfab01ba Squashed 'externals/oaknut/' changes from 86f2ca872..c2cb5ec49
c2cb5ec49 github: Faster CI
1ed4284bc code_block: Correct headers

git-subtree-dir: externals/oaknut
git-subtree-split: c2cb5ec49aa4a0748172a6a93df6a0fb17368183
2022-07-12 20:41:36 +01:00
Merry
83f484f190 externals: Update oaknut
Merge commit '04cfab01ba40307ce5421e6dde3598be7eac02bd'
2022-07-12 20:41:36 +01:00
Merry
7016ace72b llvm_disassemble: Add hex output 2022-07-12 19:20:25 +01:00
Merry
e4aeb8c738 Update .gitignore 2022-07-12 16:08:20 +01:00
Merry
9ebf6a8384 6.1.1 2022-07-11 20:59:25 +01:00
Merry
cd85b7fdaa emit_x64: Fix bugs in fast dispatcher
* We failed to invalidate entries if there are no patches required for a location descriptor.
* Bug in A64 hashing code (rbx instead of rbp).
* Bug in A32 and A64 lookup code (inconsistent choice of key: PC vs IR::LocationDescriptor).
* Test case added.
2022-07-11 16:06:54 +01:00
Merry
6243e5a90e externals: Update to mcl 0.1.11
Merge commit '78bb1d1571ec6adb716ddd080bfbfebc6e889d70'
2022-07-10 10:10:22 +01:00
Merry
78bb1d1571 Squashed 'externals/mcl/' changes from 761b7c05e..0172df743
0172df743 CMakeLists: Only add tests if MASTER_PROJECT
52e8dff62 0.1.11
fc8d745cc container: hmap fixups
5b5c0130d memory: Add overaligned_unique_ptr
c7c9bbd17 mcl: Increment version to 0.1.10
678aa32a8 assert: Handle expr strings separately
b38a9d2ef tests: Update to Catch 3.0.1
8aeacfe32 mcl: Increment version to 0.1.9
b468a2ab5 mcl: meta_byte: Split off meta_byte_group
d3ae1ae47 mcl: ihmap: Implement inline variant of hmap
5cbfe6eed mcl: hmap: Split detail into headers
ee7467677 mcl: hmap: Better default hash
f1d902ce9 mcl: hash: Add xmrx
322a221f0 mcl: hmap: Bugfix skip_empty_or_tombstone
689f393f7 mcl: hmap: x64 implementation
fa6ff746a mcl: hmap: Add generic meta_byte_group implementation
91e3073ad mcl: hmap: Add more member functions
4998335a5 mcl: Install only if master project
7ff4d2549 mcl: hmap prototype
416a2c6b5 mcl: clang-format: Adopt WebKit style bracing
d5a46fa70 mcl/assert: Flush stderr
e3b6cc79e externals: Update mcl to 0.1.7
190c68475 mcl: Build as PIC

git-subtree-dir: externals/mcl
git-subtree-split: 0172df74316351868c215f735e5a2538b10d71fb
2022-07-10 10:10:04 +01:00
Merry
501d7ce602 externals: Add oaknut
Merge commit '621367dce8abf82e3924679d72f4da0913cc1520' as 'externals/oaknut'
2022-07-10 09:38:20 +01:00
Merry
621367dce8 Squashed 'externals/oaknut/' content from commit 86f2ca872
git-subtree-dir: externals/oaknut
git-subtree-split: 86f2ca87222e59fb0b89b2f2a6b422a58a2e0892
2022-07-10 09:35:44 +01:00
Merry
6c913e8913 6.1.0 2022-07-07 23:46:59 +01:00
Wunkolo
a5318c775c constant_pool: Use std::span to manage pool
Simplifies some raw pointer arithmetic and type-usage into the new
`ConstantT` type.
2022-07-07 23:46:21 +01:00
Wunkolo
5d9b720189 block_of_code: Refactor MConst to Xmm{B}Const
`MConst` is refactored into `XmmConst` to clearly communicate the
addressable space of the newly allocated 16-byte memory constant.
`GetVectorOf` is elevated into a globally available `XmmBConst` function
that "broadcasts" bits of the input-value into n-bit elements that span
the width of the Xmm-constant.

`emit_x64_floating_point` will utilize the same 16-byte
broadcasted-constants to encourage more cache-hits within the
constant-pool between vector and non-vector code.
2022-07-07 23:46:05 +01:00
Liam
02c8b434c7 interface: allow clear of previously-signaled halt 2022-07-07 23:45:09 +01:00
Merry
ff47d0de72 externals: Remove vixl 2022-06-28 14:43:04 +01:00
Merry
7f84870712 6.0.1 2022-06-22 00:09:43 +01:00
Wunkolo
4d78d167d6 emit_x64_{vector_}floating_point: Add AVX512 implementation for ForceToDefaultNaN
`vfpclassp* k, xmm, i8` has better latency(4->3) and allocates better
execution ports(01->5) that are out of the way of ALU-ports than
`vcmpunordp* xmm, xmm, xmm`(`vcmpp* xmm, xmm, xmm, i8`) and removes the
pipeline dependency on `xmm0` in favor AVX512 `k`-mask registers.

`vblendmp* xmm, k, xmm, mem` is about the same throughput and latency as
`blendvp* xmm. mem` but has the benefit of embedded broadcasts to reduce
memory bandwidth(32/64-bit read rather than 128-bit) and lends itself to
a future size optimization feature of `constant_pool`.
2022-06-22 00:08:49 +01:00
Wunkolo
6367a26e62 emit_x64_{vector_}floating_point: Add AVX512 implementation for DenormalsAreZero
Both single and double precision floating point numbers as well as the
packed and unpacked version of this instruction will be able to use the
same memory constant. This takes advantage of the fact that `VFIXUPIMM*`
doesn't just copy from the source, but it will convert to `0.0` if it
turns out that it is a denormal and the `MXCSR.DAZ` flag is set.

```
tsrc[31:0]←((src1[30:23] = 0) AND (MXCSR.DAZ =1)) ? 0.0 : src1[31:0]
...
CASE(token_response[3:0]) {
    ...
    0001: dest[31:0]←tsrc[31:0]; ; pass through src1 normal input value, denormal as zero
    ...
```
2022-06-22 00:08:14 +01:00
Wunkolo
3ed2aebb20 backend/x64: Update FpFixup constants with denormal behavior
There is an important subtlety that should be documented here. All the
operands of `FpFixup` that read from the `Src` register actually do a
`DAZ` operation if `MXCSR.DAZ` is set.
2022-06-22 00:08:14 +01:00
Merry
94f84cf1ef Version bump to 6.0.0
Version bump to start semantic versioning
2022-06-21 21:44:19 +01:00
Merry
d40557b751 A32/A64: Allow std::nullopt from MemoryReadCode
Raise a fault at runtime if this block is executed
2022-06-21 21:41:27 +01:00
liamwhite
5ad1d02351
frontend: Add option to halt after memory accesses (#682)
Intended to be used for library users wishing implement accurate memory watchpoints.

* A32: optionally make memory instructions the end of basic blocks
* A64: optionally make memory instructions the end of basic blocks
* Make memory halt checking a user configurable
* oops
2022-06-16 18:09:04 +01:00
Merry
9af5f5908c Squashed 'externals/xbyak/' changes from 9357732aa..913099fc8
913099fc8 v6.60.1
d3910abbe update doc
7ac6b37fd Merge branch 'dev'
72c4b8ad5 refactoring
e649372b6 modify definition of Type for Visual Studio with /O0
e9cec7582 Merge branch 'dev'
153b40ed1 update changelog
f0c522af8 v6.60
553246c16 the version format has changed from A.BC(D) to A.BC(.D)

git-subtree-dir: externals/xbyak
git-subtree-split: 913099fc80e80f01fc0877c6016b9dd8cf1f0322
2022-06-16 06:53:34 +01:00
Merry
e99ba06cf3 externals: Update xbyak to 6.60.1
Merge commit '9af5f5908cee0e3d502a79cba26b4cf817d4ad3f'
2022-06-16 06:53:34 +01:00