Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdint.h>
- #include <inttypes.h>
- int main(void) {
- int64_t a = 9223372036854775807;
- int64_t b = 1;
- int64_t res = 0;
- int64_t res2 = 0;
- int64_t c = 0;
- asm("addc. %0, %1, %2 \n"
- : "=r"(res)
- : "a"(a), "b"(b));
- asm("lis %0, 256 \n"
- "ori %0, %0, 7552 \n"
- "rldicr %0, %0,16,47 \n"
- "ori %0,%0,7596 \n"
- "nop \n"
- "bc 0xC,3,there\n"
- "here: addi %1, %1, 10\n"
- "there: addi %1, %1, 42 \n"
- : "=r"(res2),"=r"(c)
- : "a"(c));
- printf("%" PRId64 "\n", res);
- printf("%" PRId64 "\n", res2);
- printf("%" PRId64 "\n", c);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement