aboutsummaryrefslogtreecommitdiffhomepage
path: root/testdata/binop.txt
diff options
context:
space:
mode:
authorJaden Weiss <[email protected]>2020-03-28 12:35:19 -0400
committerGitHub <[email protected]>2020-03-28 17:35:19 +0100
commit5cc130bb6ea92882cce391c4251159dc2effd95f (patch)
treec88573940ef57c1c013e63f129240bec0dbad64c /testdata/binop.txt
parent91d1a23b14fd95fb8bdcf306007a2c47d87c32a7 (diff)
downloadtinygo-5cc130bb6ea92882cce391c4251159dc2effd95f.tar.gz
tinygo-5cc130bb6ea92882cce391c4251159dc2effd95f.zip
compiler: implement spec-compliant shifts
Previously, the compiler used LLVM's shift instructions directly, which have UB whenever the shifts are large or negative. This commit adds runtime checks for negative shifts, and handles oversized shifts.
Diffstat (limited to 'testdata/binop.txt')
-rw-r--r--testdata/binop.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/testdata/binop.txt b/testdata/binop.txt
index 8d1f37be8..a8370b19b 100644
--- a/testdata/binop.txt
+++ b/testdata/binop.txt
@@ -54,3 +54,11 @@ false
true
true
true
+shifts
+true
+true
+true
+true
+true
+true
+true