-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix LLVM byte alignment for real (#803)
Closes #794. I've also added a test but it's a bit useless since the buggy parts all get optimized away and we currently only run tests *with* optimizations.
- Loading branch information
1 parent
e6a82e2
commit acb9c98
Showing
4 changed files
with
157 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
1 | ||
42 | ||
2 | ||
42 | ||
42 | ||
3 | ||
42 | ||
42 | ||
42 | ||
4 | ||
42 | ||
42 | ||
42 | ||
42 | ||
5 | ||
42 | ||
42 | ||
42 | ||
42 | ||
42 | ||
6 | ||
42 | ||
42 | ||
42 | ||
42 | ||
42 | ||
42 | ||
7 | ||
42 | ||
42 | ||
42 | ||
42 | ||
42 | ||
42 | ||
42 | ||
8 | ||
42 | ||
42 | ||
42 | ||
42 | ||
42 | ||
42 | ||
42 | ||
42 | ||
9 | ||
42 | ||
42 | ||
42 | ||
42 | ||
42 | ||
42 | ||
42 | ||
42 | ||
42 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
def oneByte { action: (Byte) => Unit }: Unit = | ||
action(42.toByte) | ||
|
||
def twoByte { action: (Byte, Byte) => Unit }: Unit = | ||
action(42.toByte, 42.toByte) | ||
|
||
def threeByte { action: (Byte, Byte, Byte) => Unit }: Unit = | ||
action(42.toByte, 42.toByte, 42.toByte) | ||
|
||
def fourByte { action: (Byte, Byte, Byte, Byte) => Unit }: Unit = | ||
action(42.toByte, 42.toByte, 42.toByte, 42.toByte) | ||
|
||
def fiveByte { action: (Byte, Byte, Byte, Byte, Byte) => Unit }: Unit = | ||
action(42.toByte, 42.toByte, 42.toByte, 42.toByte, 42.toByte) | ||
|
||
def sixByte { action: (Byte, Byte, Byte, Byte, Byte, Byte) => Unit }: Unit = | ||
action(42.toByte, 42.toByte, 42.toByte, 42.toByte, 42.toByte, 42.toByte) | ||
|
||
def sevenByte { action: (Byte, Byte, Byte, Byte, Byte, Byte, Byte) => Unit }: Unit = | ||
action(42.toByte, 42.toByte, 42.toByte, 42.toByte, 42.toByte, 42.toByte, 42.toByte) | ||
|
||
def eightByte { action: (Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte) => Unit }: Unit = | ||
action(42.toByte, 42.toByte, 42.toByte, 42.toByte, 42.toByte, 42.toByte, 42.toByte, 42.toByte) | ||
|
||
def nineByte { action: (Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte) => Unit }: Unit = | ||
action(42.toByte, 42.toByte, 42.toByte, 42.toByte, 42.toByte, 42.toByte, 42.toByte, 42.toByte, 42.toByte) | ||
|
||
def main() = { | ||
oneByte { (b0) => | ||
println(1) | ||
println(b0) | ||
} | ||
twoByte { (b0, b1) => | ||
println(2) | ||
println(b0) | ||
println(b1) | ||
} | ||
threeByte { (b0, b1, b2) => | ||
println(3) | ||
println(b0) | ||
println(b1) | ||
println(b2) | ||
} | ||
fourByte { (b0, b1, b2, b3) => | ||
println(4) | ||
println(b0) | ||
println(b1) | ||
println(b2) | ||
println(b3) | ||
} | ||
fiveByte { (b0, b1, b2, b3, b4) => | ||
println(5) | ||
println(b0) | ||
println(b1) | ||
println(b2) | ||
println(b3) | ||
println(b4) | ||
} | ||
sixByte { (b0, b1, b2, b3, b4, b5) => | ||
println(6) | ||
println(b0) | ||
println(b1) | ||
println(b2) | ||
println(b3) | ||
println(b4) | ||
println(b5) | ||
} | ||
sevenByte { (b0, b1, b2, b3, b4, b5, b6) => | ||
println(7) | ||
println(b0) | ||
println(b1) | ||
println(b2) | ||
println(b3) | ||
println(b4) | ||
println(b5) | ||
println(b6) | ||
} | ||
eightByte { (b0, b1, b2, b3, b4, b5, b6, b7) => | ||
println(8) | ||
println(b0) | ||
println(b1) | ||
println(b2) | ||
println(b3) | ||
println(b4) | ||
println(b5) | ||
println(b6) | ||
println(b7) | ||
} | ||
nineByte { (b0, b1, b2, b3, b4, b5, b6, b7, b8) => | ||
println(9) | ||
println(b0) | ||
println(b1) | ||
println(b2) | ||
println(b3) | ||
println(b4) | ||
println(b5) | ||
println(b6) | ||
println(b7) | ||
println(b8) | ||
} | ||
} |