Opened 7 years ago

Closed 7 years ago

#339 closed enhancement (fixed)

Porting to windows 64

Reported by: Maxim Reznik Owned by:
Priority: major Milestone: 0.6.0
Component: Matreshka Version:
Keywords: windows 64 Cc:

Description

Here are some notes just in case we decide to make win x64 port.

I tried to compile r4376 with mingw64. I used mingw-w64-gcc-4.7.2-runtime-2.0.7-static-ada-gc-20121112.7z

gcc -c -g -gnatwa -gnat12 -gnatW8 -O2 -gnatn matreshka-internals-strings-handlers-x86_64.ads
C:\...\source\league\arch\x86_generic\matreshka-internals-strings-handlers-generic_x86_sse2.adb:
 In function 'Matreshka.Internals.Strings.Handlers.X86_64.Is_Equal':

C:\...\source\league\arch\x86_generic\matreshka-internals-strings-handlers-generic_x86_sse2.adb:567:18:
 error: '.builtin_ia32_pcmpeqw128' needs isa option -msse2

C:\...\source\league\arch\x86_generic\matreshka-internals-strings-handlers-generic_x86_sse2.adb:567: confused by earlier errors, bailing out

   compilation of matreshka-internals-strings-handlers-x86_64.ads failed

After adding -msse2 to compiler options make works fine (except linked with Oracle oci.dll). Then make check fails:

.objs/string_operations_test

raised PROGRAM_ERROR : matreshka-atomics-generic_test_and_set__gcc__64.adb:73 misaligned address value

Change History (3)

comment:1 by Maxim Reznik, 7 years ago

Piece of gdb session on string_operations_test:

#6  0x6dce38d2 in matreshka.internals.strings.test_and_set (
    new_value=0x25a65e8, expected_value=0x0, target=0x0)
    at C:/Users/max/bitten-root/aaa/source/league/matreshka-atomics-generic_test_and_set__gcc__64.adb:73
#7  matreshka.internals.strings.compute_index_map (self=...)
    at C:\Users\max\bitten-root\aaa\source\league\matreshka-internals-strings.adb:170
#8  0x6dd1afa8 in league.strings.replace (self=..., low=88, high=88, by=...)
    at C:\Users\max\bitten-root\aaa\source\league\league-strings.adb:1752
#9  0x004026d8 in string_operations_test ()
    at C:\Users\max\bitten-root\aaa\testsuite\league\string_operations_test.adb:188
#6  0x6dce38d2 in matreshka.internals.strings.test_and_set (
    new_value=0x25a65e8, expected_value=0x0, target=0x0)
    at C:/Users/max/bitten-root/aaa/source/league/matreshka-atomics-generic_test_and_set__gcc__64.adb:73
73	   for Dummy'Address use Target'Address;
$3 = (access matreshka.internals.strings.index_map) 0x0
$4 = (access matreshka.internals.strings.index_map_access) 0x242fb5c

comment:2 by vadim.godunko, 7 years ago

Milestone: 0.7.0
Version: 0.5.0

comment:3 by vadim.godunko, 7 years ago

Milestone: 0.7.00.6.0
Resolution: fixed
Status: newclosed

Build successfully with GNAT Pro x86_64/windows

Note: See TracTickets for help on using tickets.