OLD | NEW |
(Empty) | |
| 1 // This aims to test the icmp bitcode instruction across all PNaCl |
| 2 // primitive integer types. |
| 3 |
| 4 #include <stdint.h> |
| 5 |
| 6 #include "test_icmp.h" |
| 7 |
| 8 #define X(cmp, op) \ |
| 9 bool icmp##cmp(uint8_t a, uint8_t b) { return a op b; } \ |
| 10 bool icmp##cmp(uint16_t a, uint16_t b) { return a op b; } \ |
| 11 bool icmp##cmp(uint32_t a, uint32_t b) { return a op b; } \ |
| 12 bool icmp##cmp(uint64_t a, uint64_t b) { return a op b; } |
| 13 ICMP_U_TABLE |
| 14 #undef X |
| 15 #define X(cmp, op) \ |
| 16 bool icmp##cmp(int8_t a, int8_t b) { return a op b; } \ |
| 17 bool icmp##cmp(int16_t a, int16_t b) { return a op b; } \ |
| 18 bool icmp##cmp(int32_t a, int32_t b) { return a op b; } \ |
| 19 bool icmp##cmp(int64_t a, int64_t b) { return a op b; } |
| 20 ICMP_S_TABLE |
| 21 #undef X |
OLD | NEW |