diff options
author | Ayke van Laethem <[email protected]> | 2020-05-15 23:24:41 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2020-05-28 15:11:46 +0200 |
commit | fed433c04649ebeff2bbcf7a126fa36c525430ea (patch) | |
tree | 68ddc9c8563fc6d90cc2d8fabd4a1eb963e2149d /testdata/atomic.txt | |
parent | 734613c20e4695acb11aea0c569dc0fef9455c22 (diff) | |
download | tinygo-fed433c04649ebeff2bbcf7a126fa36c525430ea.tar.gz tinygo-fed433c04649ebeff2bbcf7a126fa36c525430ea.zip |
compiler: add support for atomic operations
This also implements DisableInterrupts/EnableInterrupts for RISC-V, as
those operations were needed to implement a few libcalls.
Diffstat (limited to 'testdata/atomic.txt')
-rw-r--r-- | testdata/atomic.txt | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/testdata/atomic.txt b/testdata/atomic.txt new file mode 100644 index 000000000..d1f2ab293 --- /dev/null +++ b/testdata/atomic.txt @@ -0,0 +1,35 @@ +AddInt32: 3 3 +AddInt64: 3 3 +AddUint32: 13 13 +AddUint64: 13 13 +AddUintptr: 13 13 +SwapInt32: 3 33 +SwapInt64: 3 33 +SwapUint32: 13 33 +SwapUint64: 13 33 +SwapUintptr: 13 33 +SwapPointer: true true +CompareAndSwapInt32: false -5 +CompareAndSwapInt32: true 3 +CompareAndSwapInt64: false -5 +CompareAndSwapInt64: true 3 +CompareAndSwapUint32: false 5 +CompareAndSwapUint32: true 3 +CompareAndSwapUint64: false 5 +CompareAndSwapUint64: true 3 +CompareAndSwapUintptr: false 5 +CompareAndSwapUintptr: true 3 +CompareAndSwapPointer: false true +CompareAndSwapPointer: true true +LoadInt32: 3 +LoadInt64: 3 +LoadUint32: 3 +LoadUint64: 3 +LoadUintptr: 3 +LoadPointer: true +StoreInt32: -20 +StoreInt64: -20 +StoreUint32: 20 +StoreUint64: 20 +StoreUintptr: 20 +StorePointer: true |