[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/part_set.c part_set.reference_output

Reid Spencer reid at x10sys.com
Wed May 16 21:36:46 PDT 2007



Changes in directory llvm-test/SingleSource/UnitTests/Integer:

part_set.c added (r1.1)
part_set.reference_output added (r1.1)
---
Log message:

Add a new test case.


---
Diffs of the changes:  (+24 -0)

 part_set.c                |   19 +++++++++++++++++++
 part_set.reference_output |    5 +++++
 2 files changed, 24 insertions(+)


Index: llvm-test/SingleSource/UnitTests/Integer/part_set.c
diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/part_set.c:1.1
*** /dev/null	Wed May 16 23:36:36 2007
--- llvm-test/SingleSource/UnitTests/Integer/part_set.c	Wed May 16 23:36:26 2007
***************
*** 0 ****
--- 1,19 ----
+ #include "bits.h"
+ #include <stdio.h>
+ 
+ int main(int argc, char** argv) {
+   uint68 x = 0xF0F0F0F0F0F0F0F0ULL;
+   uint60 y = 0x0F0F0F0F0F0F0F0FULL;
+   uint68 z = part_set(x, y, 0, (bitwidthof(y)-1)); 
+   uint68 z2= part_set(x, y, (bitwidthof(y)-1), 0); 
+   printf("x = ");
+   printBits(x);
+   printf("\ny = ");
+   printBits(y);
+   printf("\npart_set(x, y, 0, 59) = ");
+   printBits(z);
+   printf("\npart_set(x, y, 59, 0) = ");
+   printBits(z2);
+   printf("\n");
+   return (int) z;
+ }


Index: llvm-test/SingleSource/UnitTests/Integer/part_set.reference_output
diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/part_set.reference_output:1.1
*** /dev/null	Wed May 16 23:36:46 2007
--- llvm-test/SingleSource/UnitTests/Integer/part_set.reference_output	Wed May 16 23:36:26 2007
***************
*** 0 ****
--- 1,5 ----
+ x = 00001111000011110000111100001111000011110000111100001111000011110000
+ y = 111100001111000011110000111100001111000011110000111100001111
+ part_set(x, y, 0, 59) = 00001111111100001111000011110000111100001111000011110000111100001111
+ part_set(x, y, 59, 0) = 00001111111100001111000011110000111100001111000011110000111100001111
+ exit 15






More information about the llvm-commits mailing list