2 # Copyright (C) 2001-2010, Parrot Foundation.
7 t/op/64bit.t - Testing integer ops on 64-bit platforms
15 Test integer operations on platforms with 64-bit integers.
16 Tests are skipped on other platforms.
21 .include "iglobals.pasm"
22 .include 'test_more.pir'
24 # Check to see if this is 64 bit
25 .local pmc interp # a handle to our interpreter object.
28 config = interp[.IGLOBALS_CONFIG_HASH]
30 intvalsize = config['intvalsize']
34 if intvalsize == 8 goto is_64_bit
35 skip(5, "this is not a 64 bit platform")
40 # setup TODO for platform 'MSWin32'
42 osname = config['osname']
45 unless osname == "MSWin32" goto do_test
57 # check bitops for 8-byte ints
60 set $I0, 0xffffffffffffffff
62 if todo_1 goto do_todo
63 is( $I0, -1, 'bitops64' )
67 if $I0 == -1 goto todo_pass
68 todo ( 0, 'bitops64', 'not working on MSWin32, amd64' )
71 todo ( 1, 'bitops64', 'not working on MSWin32, amd64' )
74 set $I1, 0x00000000ffffffff
75 is( $I1, 4294967295, 'bitops64' )
79 is( $I0, -4294967296, 'bitops64' )
82 is( $I2, 0, 'bitops64' )
85 is( $I2, -1, 'bitops64' )
92 # vim: expandtab shiftwidth=4 ft=pir: