# expected: 0000000000000000, 000000003FFFFFFF, FFFFFFFFC0000000, FFFFFFFFFFFFFFFF, FFFFFFFFFFFFFFFF
    .text
_start:
    # Test 1:  1 >> 1  => 0
    li    x1, 1
    sraiw x31, x1, 1   # x31 = 0

    # Test 2:  0x7fffffff >> 1  => 0x3fffffff
    li    x1, 0x7fffffff
    sraiw x31, x1, 1   # x31 = 0x000000003fffffff

    # Test 3:  0x80000000 >> 1  => 0xc0000000 (sign-extended)
    li    x1, 0x80000000
    sraiw x31, x1, 1   # x31 = 0xffffffffc0000000

    # Test 4:  0x80000000 >> 31 => 0xffffffff (-1)
    li    x1, 0x80000000
    sraiw x31, x1, 31  # x31 = 0xffffffffffffffff

    # Test 5:  0xffffffff >> 31 => 0xffffffff (-1)
    li    x1, -1
    sraiw x31, x1, 31  # x31 = 0xffffffffffffffff
