[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/test_part_set.c test_part_set.reference_output
Reid Spencer
reid at x10sys.com
Mon May 14 19:29:51 PDT 2007
Changes in directory llvm-test/SingleSource/UnitTests/Integer:
test_part_set.c updated: 1.1 -> 1.2
test_part_set.reference_output updated: 1.1 -> 1.2
---
Log message:
Test additional cases.
---
Diffs of the changes: (+31 -8)
test_part_set.c | 32 +++++++++++++++++++++++++-------
test_part_set.reference_output | 7 ++++++-
2 files changed, 31 insertions(+), 8 deletions(-)
Index: llvm-test/SingleSource/UnitTests/Integer/test_part_set.c
diff -u llvm-test/SingleSource/UnitTests/Integer/test_part_set.c:1.1 llvm-test/SingleSource/UnitTests/Integer/test_part_set.c:1.2
--- llvm-test/SingleSource/UnitTests/Integer/test_part_set.c:1.1 Sat May 12 06:14:00 2007
+++ llvm-test/SingleSource/UnitTests/Integer/test_part_set.c Mon May 14 21:29:32 2007
@@ -1,19 +1,37 @@
#include "bits.h"
+#include <stdio.h>
uint68 test_part_set(uint68 x, uint60 y)
{
- return part_set(x, y, 0, (bitwidthof(y)-1));
-}
+ printf("uint68 x = ");
+ printBits(x);
+ printf("\n");
-uint1 test_reduce(uint68 x)
-{
- return reduce(or, x);
+ printf("uint60 y = ");
+ printBits(y);
+ printf("\n");
+
+ printf("part_set(x,y,0,59) = ");
+ uint68 z = part_set(x, y, 0, (bitwidthof(y)-1));
+ printBits(z);
+ printf("\n");
+
+ printf("part_set(x,y,59,0) = ");
+ z = part_set(x, y, (bitwidthof(y)-1), 0);
+ printBits(z);
+ printf("\n");
+
+ printf("part_set(x,0,0,31) = ");
+ z = part_set(x, 0, 0, 31);
+ printBits(z);
+ printf("\n");
+
+ return z;
}
int main(int argc, char** argv) {
uint68 A = 0xF0F0F0F0F0F0F0F0ULL;
uint60 B = 0x0F0F0F0F0F0F0F0FULL;
uint68 X = test_part_set(A, B);
- uint1 Y = test_reduce(X);
- return (int) Y;
+ return 0;
}
Index: llvm-test/SingleSource/UnitTests/Integer/test_part_set.reference_output
diff -u llvm-test/SingleSource/UnitTests/Integer/test_part_set.reference_output:1.1 llvm-test/SingleSource/UnitTests/Integer/test_part_set.reference_output:1.2
--- llvm-test/SingleSource/UnitTests/Integer/test_part_set.reference_output:1.1 Sat May 12 06:14:00 2007
+++ llvm-test/SingleSource/UnitTests/Integer/test_part_set.reference_output Mon May 14 21:29:32 2007
@@ -1 +1,6 @@
-exit 1
+uint68 x = 00001111000011110000111100001111000011110000111100001111000011110000
+uint60 y = 111100001111000011110000111100001111000011110000111100001111
+part_set(x,y,0,59) = 00001111111100001111000011110000111100001111000011110000111100001111
+part_set(x,y,59,0) = 00001111111100001111000011110000111100001111000011110000111100001111
+part_set(x,0,0,31) = 00001111000011110000111100001111000000000000000000000000000000000000
+exit 0
More information about the llvm-commits
mailing list