Code Monkey home page Code Monkey logo

pearpc's People

Contributors

kallisti5 avatar sebastianbiallas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pearpc's Issues

Feature request: G5 with 64bit support

I know this could require an amount of work because it might need to implement not only the G5 instruction set, but perhaps a new chipset (not sure of this, it depends on what chipset PearPC emulates now).

However, even if it can require work, it's becoming harder and harder to maintain G5 machines: it's difficult to find replacements, and some machines like the iMac G5 or the liquid cooling Power Mac are not easy to fix when they fail.

The G5 deserves to have a longer life. It can run 64 bit code and can address large amounts of memory. Emulating it on PearPC would keep the G5 alive, so please don't give up on this!

Internet Problems on Mac OS X

Hi,I do not know how to Get the Internet Working On Mac Cuse i look at the Guide and Look it up to It Does not make Sense to me, Let me Know Thanks

JIT does not compile on Mac OS X 10.10

JIT is unable to compile on Mac OS X 10.10 using Xcode 6.3 with SDK 10.10. Fails on several assembly lines.

gcc -DHAVE_CONFIG_H -I. -I../../.. -I ../..    -DPREFIX=_ -MT jitc_tools.o -MD -MP -MF .deps/jitc_tools.Tpo -c -o jitc_tools.o jitc_tools.S
jitc_tools.S:274:13: error: unknown token in expression
 test eax, ~((1<<30)|(1<<27)|(1<<25)|(1<<18)|(1<<15)|(1<<14)|(1<<13)|(1<<12)|(1<<11)|(1<<10)|(1<<8)|(1<<5)|(1<<4)|(1<<1))
            ^
jitc_tools.S:299:12: error: unknown token in expression
 and eax, ~(1<<18)
           ^
gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

Using "generic" interpreter compiles perfectly.

Trouble booting OSX 10.2 on x86_64

When I try and run this, booting stops with the apple displayed, but with before the spinner appears.

I've got a version of ppc4, which can boot this, in wine using ppc ppc4.config - this might not be helpful, as I think the ppc4 version is 32 bit and my build should be 64 bit

ppc - git getting stuck during boot ...

ppc ppc4.config 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as published by
the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA

&gMemory: 0x7fcc111c1000
GenuineIntel
translation cache: 40153000
[CPU/MMU] new pagetable: sdr1 = 0x00300003
[CPU/MMU] new pagetable: sdr1 accepted
[CPU/MMU] number of pages: 2^15 pagetable_start: 0x00300000 size: 2^18
start: 512
start: 32768
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 3 Apple_Free
start: 134250496
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
start: 2147450880
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 3 Apple_Free
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
Loading XCOFF...
[CPU/CPU] execution started at 01c00cb0
*** &gCPU: ba8150, &gJITC: ba8c00
sizeof cpu: 2720

ppc4 in wine, completing boot ...

wine ppc4.exe ppc4.config 
fixme:service:scmdatabase_autostart_services Auto-start service L"F06DEFF2-5B9C-490D-910F-35D3A9119622" failed to start: 3
wine: Unhandled page fault on read access to 0xfffff78000000320 at address 0x44a03c (thread 0027), starting debugger...
fixme:service:scmdatabase_autostart_services Auto-start service L"SmdmFService" failed to start: 2
fixme:service:scmdatabase_autostart_services Auto-start service L"UMWdf" failed to start: 2
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as published by
the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA

GenuineIntel
 CMOV MMX SSE SSE2 SSE3
[CPU/MMU] new pagetable: sdr1 = 0x00300003
[CPU/MMU] new pagetable: sdr1 accepted
[CPU/MMU] number of pages: 2^15 pagetable_start: 0x00300000 size: 2^18
start: 512
start: 32768
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 3 Apple_Free
start: 134250496
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
start: 2147450880
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 3 Apple_Free
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
[CPU/CPU] execution started at 01c00cb0
[CPU/MMU] new pagetable: sdr1 = 0x0080000f
[CPU/MMU] new pagetable: sdr1 accepted
[CPU/MMU] number of pages: 2^17 pagetable_start: 0x00800000 size: 2^20

Compare of unsigned int to signed int

https://github.com/sebastianbiallas/pearpc/blob/master/src/io/prom/promboot.cc#L588

There are a grouping of comparisons of unsigned numbers to a signed -1 here.. likely a bug but I'm not sure what that code is looking for.

g++ -DHAVE_CONFIG_H -I. -I../../..  -I ../..   -Wundef -Wall -Woverloaded-virtual -std=c++11 -fsigned-char -O3 -fomit-frame-pointer -g -fno-inline -pthread -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -MT promboot.o -MD -MP -MF .deps/promboot.Tpo -c -o promboot.o promboot.cc
promboot.cc: In function ‘bool init_page_create(uint32, uint32)’:
promboot.cc:368:32: warning: ‘bool ppc_prom_page_create(uint32, uint32)’ is deprecated (declared at ../../cpu/mem.h:42) [-Wdeprecated-declarations]
  return prom_claim_page(pa) && ppc_prom_page_create(ea, pa);
                                ^
promboot.cc:368:59: warning: ‘bool ppc_prom_page_create(uint32, uint32)’ is deprecated (declared at ../../cpu/mem.h:42) [-Wdeprecated-declarations]
  return prom_claim_page(pa) && ppc_prom_page_create(ea, pa);
                                                           ^
promboot.cc: In function ‘bool chrp_init_page_create(uint32, uint32, int)’:
promboot.cc:381:17: warning: ‘bool ppc_prom_page_create(uint32, uint32)’ is deprecated (declared at ../../cpu/mem.h:42) [-Wdeprecated-declarations]
   return ret && ppc_prom_page_create(ea, pa);
                 ^
promboot.cc:381:44: warning: ‘bool ppc_prom_page_create(uint32, uint32)’ is deprecated (declared at ../../cpu/mem.h:42) [-Wdeprecated-declarations]
   return ret && ppc_prom_page_create(ea, pa);
                                            ^
promboot.cc: In function ‘bool mapped_load_elf_from_chrp(File&, uint)’:
promboot.cc:588:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (desc->real_base != -1)
                         ^
promboot.cc:591:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (desc->real_size != -1)
                         ^
promboot.cc:594:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (desc->virt_base != -1)
                         ^
promboot.cc:597:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (desc->virt_size != -1)
                         ^
promboot.cc:600:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (desc->load_base != -1)
                         ^
promboot.cc:635:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    if (loader_size > phdr[i].p_memsz) {
                    ^
promboot.cc:682:3: warning: ‘bool ppc_prom_page_create(uint32, uint32)’ is deprecated (declared at ../../cpu/mem.h:42) [-Wdeprecated-declarations]
   ppc_prom_page_create(0, 0);
   ^
promboot.cc:682:28: warning: ‘bool ppc_prom_page_create(uint32, uint32)’ is deprecated (declared at ../../cpu/mem.h:42) [-Wdeprecated-declarations]
   ppc_prom_page_create(0, 0);
                            ^
promboot.cc:620:10: warning: unused variable ‘client_size’ [-Wunused-variable]
   sint32 client_size = f.getSize() - disp_off;
          ^
promboot.cc:623:8: warning: unused variable ‘page’ [-Wunused-variable]
   byte page[PPC_PAGE_SIZE];
        ^
promboot.cc: In function ‘bool mapped_load_elf(File&)’:
promboot.cc:787:3: warning: ‘bool ppc_prom_page_create(uint32, uint32)’ is deprecated (declared at ../../cpu/mem.h:42) [-Wdeprecated-declarations]
   ppc_prom_page_create(0, 0);
   ^
promboot.cc:787:28: warning: ‘bool ppc_prom_page_create(uint32, uint32)’ is deprecated (declared at ../../cpu/mem.h:42) [-Wdeprecated-declarations]
   ppc_prom_page_create(0, 0);
                            ^
promboot.cc: In function ‘bool mapped_load_chrp(File&)’:
promboot.cc:1082:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (index=0; index<buflen-1; index++) {
                       ^
promboot.cc: In function ‘bool promboot_copy_file_to_memory(File&, uint32&, uint32&, sint32, sint32, int)’:
promboot.cc:479:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
mv -f .deps/promboot.Tpo .deps/promboot.Po
rm -f libprom.a
/usr/bin/ar cru libprom.a prom.o prommem.o fcode.o forth.o forthtable.o promboot.o promosi.o promdt.o 
ranlib libprom.a

cpu_init failed on macOS 10.15

The programs builds and installs correctly in macOS 10.15

Unfortunately building it with cpu_jitc_x86_64 when you start the emulator it fails declaring

&gMemory: 0x10d86c000
GenuineIntel
translation cache: 0
cpu_init failed! Out of memory?

I tried building it with generic cpu but I get Segmentation fault: 11

error message when configuring: error: Could not find XOpenDisplay in -lX11

the package libxext-dev may be missing in some cases: to add in the example below. Thanks!

Compiling on Linux

On Ubuntu based system

At first you will need GCC and G++ compiler you will need also build-essential and Autoconf Automake
You may need the libxext-dev package as well

sudo apt-get install gcc g++
sudo apt-get install autoconf automake
sudo apt-get install build-essential
sudo apt-get install libxext-dev

Install Lex and Yacc

sudo apt-get install byacc flex

After installing type following commands

./autogen.sh
./configure
make

If no error occurs you will get ppc binary in src directory

Compiling on OS X

On El Capitan 10.11

If you haven't already, install XQuartz.

In Terminal, run the following commands:

./autogen.sh
./configure
make

JIT (x86-64) segfaults on Mac OS X 10.10, interpreter works

Running JIT with any host OS results on segmentation fault on Mac OS X 10.10 (x86-64). Generic interpreter works.

Console output:

$ /Development/pearpc/src/ppc_jit pearpc.conf
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as published by
the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA

&gMemory: 0x10baa1000
GenuineIntel
translation cache: 10faa2000
[CPU/MMU] new pagetable: sdr1 = 0x00300003
[CPU/MMU] new pagetable: sdr1 accepted
[CPU/MMU] number of pages: 2^15 pagetable_start: 0x00300000 size: 2^18
start: 512
start: 32768
getStartBlock: 0 Apple_Driver43
getStartBlock: 1 Apple_Driver43
getStartBlock: 2 Apple_Driver43
getStartBlock: 3 Apple_Driver43
getStartBlock: 4 Apple_Driver43
getStartBlock: 5 Apple_Driver43
getStartBlock: 6 Apple_Driver43
getStartBlock: 7 Apple_Driver43
getStartBlock: 8 Apple_Driver43
getStartBlock: 9 Apple_Driver43
start: 61440
getStartBlock: 0 Apple_Driver43_CD
getStartBlock: 1 Apple_Driver43_CD
getStartBlock: 2 Apple_Driver43_CD
getStartBlock: 3 Apple_Driver43_CD
getStartBlock: 4 Apple_Driver43_CD
getStartBlock: 5 Apple_Driver43_CD
getStartBlock: 6 Apple_Driver43_CD
getStartBlock: 7 Apple_Driver43_CD
getStartBlock: 8 Apple_Driver43_CD
getStartBlock: 9 Apple_Driver43_CD
start: 0
getStartBlock: 0 Apple_Void
getStartBlock: 1 Apple_Void
getStartBlock: 2 Apple_Void
getStartBlock: 3 Apple_Void
getStartBlock: 4 Apple_Void
getStartBlock: 5 Apple_Void
getStartBlock: 6 Apple_Void
getStartBlock: 7 Apple_Void
getStartBlock: 8 Apple_Void
getStartBlock: 9 Apple_Void
start: 122880
getStartBlock: 0 Apple_Driver_ATAPI
getStartBlock: 1 Apple_Driver_ATAPI
getStartBlock: 2 Apple_Driver_ATAPI
getStartBlock: 3 Apple_Driver_ATAPI
getStartBlock: 4 Apple_Driver_ATAPI
getStartBlock: 5 Apple_Driver_ATAPI
getStartBlock: 6 Apple_Driver_ATAPI
getStartBlock: 7 Apple_Driver_ATAPI
getStartBlock: 8 Apple_Driver_ATAPI
getStartBlock: 9 Apple_Driver_ATAPI
start: 151552
getStartBlock: 0 Apple_Driver_ATAPI
getStartBlock: 1 Apple_Driver_ATAPI
getStartBlock: 2 Apple_Driver_ATAPI
getStartBlock: 3 Apple_Driver_ATAPI
getStartBlock: 4 Apple_Driver_ATAPI
getStartBlock: 5 Apple_Driver_ATAPI
getStartBlock: 6 Apple_Driver_ATAPI
getStartBlock: 7 Apple_Driver_ATAPI
getStartBlock: 8 Apple_Driver_ATAPI
getStartBlock: 9 Apple_Driver_ATAPI
start: 212992
getStartBlock: 0 Apple_Patches
getStartBlock: 1 Apple_Patches
getStartBlock: 2 Apple_Patches
getStartBlock: 3 Apple_Patches
getStartBlock: 4 Apple_Patches
getStartBlock: 5 Apple_Patches
getStartBlock: 6 Apple_Patches
getStartBlock: 7 Apple_Patches
getStartBlock: 8 Apple_Patches
getStartBlock: 9 Apple_Patches
start: 0
getStartBlock: 0 Apple_Void
getStartBlock: 1 Apple_Void
getStartBlock: 2 Apple_Void
getStartBlock: 3 Apple_Void
getStartBlock: 4 Apple_Void
getStartBlock: 5 Apple_Void
getStartBlock: 6 Apple_Void
getStartBlock: 7 Apple_Void
getStartBlock: 8 Apple_Void
getStartBlock: 9 Apple_Void
start: 843776
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
getStartBlock: 4 Apple_HFS
getStartBlock: 5 Apple_HFS
getStartBlock: 6 Apple_HFS
getStartBlock: 7 Apple_HFS
getStartBlock: 8 Apple_HFS
getStartBlock: 9 Apple_HFS
start: 592859136
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 3 Apple_Free
getStartBlock: 4 Apple_Free
getStartBlock: 5 Apple_Free
getStartBlock: 6 Apple_Free
getStartBlock: 7 Apple_Free
getStartBlock: 8 Apple_Free
getStartBlock: 9 Apple_Free
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
getStartBlock: 4 Apple_HFS
getStartBlock: 5 Apple_HFS
getStartBlock: 6 Apple_HFS
getStartBlock: 7 Apple_HFS
getStartBlock: 8 Apple_HFS
getStartBlock: 9 Apple_HFS
Loading XCOFF...
[CPU/CPU] execution started at 01c005b4
*** &gCPU: 7fc559801000, &gJITC: 7fc55a001000
2720
fff
Segmentation fault: 11

Crash log:

Process:               ppc_jit [81305]
Path:                  /Development/*/ppc_jit
Identifier:            ppc_jit
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        bash [1347]
Responsible:           iTerm [686]
User ID:               502

Date/Time:             2015-04-29 04:02:22.328 +0100
OS Version:            Mac OS X 10.10 (14A389)
Report Version:        11
Anonymous UUID:        53834799-CD1F-3D97-ED91-70536B7FCA4F


Time Awake Since Boot: 1800000 seconds

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x000000000df842d0

VM Regions Near 0xdf842d0:
--> 
    __TEXT                 000000010decf000-000000010df68000 [  612K] r-x/rwx SM=COW  /Development/*

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   ???                             0x00000001121ce344 0 + 4598850372

Thread 1:
0   libsystem_kernel.dylib          0x00007fff95ff73f6 __select + 10
1   libxcb.1.dylib                  0x000000010e15ed9d _xcb_out_send + 68
2   libxcb.1.dylib                  0x000000010e15ed3e xcb_writev + 68
3   libX11.6.dylib                  0x000000010e046b9a _XSend + 326
4   libX11.6.dylib                  0x000000010e03d207 PutSubImage + 3355
5   libX11.6.dylib                  0x000000010e03c649 PutSubImage + 349
6   libX11.6.dylib                  0x000000010e03c45c XPutImage + 953
7   ppc_jit                         0x000000010ded98f5 X11SystemDisplay::displayShow() + 261

Thread 2:
0   libsystem_kernel.dylib          0x00007fff95ff7132 __psynch_cvwait + 10
1   ppc_jit                         0x000000010defc3fc cudaEventLoop(void*) + 92
2   libsystem_pthread.dylib         0x00007fff99db72fc _pthread_body + 131
3   libsystem_pthread.dylib         0x00007fff99db7279 _pthread_start + 176
4   libsystem_pthread.dylib         0x00007fff99db54b1 thread_start + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x000000000000019c  rcx: 0x0000000001cc0000  rdx: 0x0000000000000000
  rdi: 0x00007fff51d2fa88  rsi: 0x0000000000000e7c  rbp: 0x0000000001cc012c  rsp: 0x00007fff51d2fa80
   r8: 0x0000000000000088   r9: 0x0000000000000000  r10: 0x0000000000000000  r11: 0x00000001121ce399
  r12: 0x0000000000000000  r13: 0x0000000001c00d20  r14: 0x0000000001c00d20  r15: 0x0000000001cc015c
  rip: 0x00000001121ce344  rfl: 0x0000000000010246  cr2: 0x000000000df842d0

Logical CPU:     1
Error Code:      0x00000004
Trap Number:     14


Binary Images:
       0x10decf000 -        0x10df67ff7 +ppc_jit (0) <35A34E47-1C70-339C-B681-56072E59C15E> /Development/*/ppc_jit
       0x10e026000 -        0x10e12ffff +libX11.6.dylib (10) <87781555-B810-3B19-95D6-C67EB8C7B4A6> /opt/X11/*/libX11.6.dylib
       0x10e15d000 -        0x10e172ff7 +libxcb.1.dylib (3) <4C73EEBD-08C6-3C93-9F2C-60CF7D63D6F1> /opt/X11/*/libxcb.1.dylib
       0x10e18b000 -        0x10e18cfff +libXau.6.dylib (7) <58D3B6CB-9468-3826-9D52-8F0FCE8CCE3B> /opt/X11/*/libXau.6.dylib
       0x10e196000 -        0x10e199fff +libXdmcp.6.dylib (7) <6DD4CCAD-9891-3039-A7DA-3EA54D85FDF6> /opt/X11/*/libXdmcp.6.dylib
    0x7fff63191000 -     0x7fff631c7837  dyld (353.2.1) <4696A982-1500-34EC-9777-1EF7A03E2659> /usr/lib/dyld
    0x7fff8d929000 -     0x7fff8d92aff7  libsystem_blocks.dylib (65) <9615D10A-FCA7-3BE4-AA1A-1B195DACE1A1> /usr/lib/system/libsystem_blocks.dylib
    0x7fff8de39000 -     0x7fff8de39ff7  liblaunch.dylib (559.1.22) <8A988924-8BE7-35FE-BF7D-322E90EFE49E> /usr/lib/system/liblaunch.dylib
    0x7fff8e5ac000 -     0x7fff8e5dcfff  libsystem_m.dylib (3086.1) <1E12AB45-6D96-36D0-A226-F24D9FB0D9D6> /usr/lib/system/libsystem_m.dylib
    0x7fff8e5dd000 -     0x7fff8e615ffb  libsystem_network.dylib (411) <C0B2313D-47BE-38A9-BEE6-2634A4F5E14B> /usr/lib/system/libsystem_network.dylib
    0x7fff8e6d9000 -     0x7fff8e6dafff  libsystem_secinit.dylib (18) <581DAD0F-6B63-3A48-B63B-917AF799ABAA> /usr/lib/system/libsystem_secinit.dylib
    0x7fff8e86f000 -     0x7fff8e899ff7  libdispatch.dylib (442.1.4) <502CF32B-669B-3709-8862-08188225E4F0> /usr/lib/system/libdispatch.dylib
    0x7fff8efaf000 -     0x7fff8efb8ff7  libsystem_notify.dylib (133.1.1) <61147800-F320-3DAA-850C-BADF33855F29> /usr/lib/system/libsystem_notify.dylib
    0x7fff8f59a000 -     0x7fff8f5a0fff  libsystem_trace.dylib (72.1.3) <A9E6B7D8-C327-3742-AC54-86C94218B1DF> /usr/lib/system/libsystem_trace.dylib
    0x7fff90077000 -     0x7fff90082fff  libcommonCrypto.dylib (60061) <D381EBC6-69D8-31D3-8084-5A80A32CB748> /usr/lib/system/libcommonCrypto.dylib
    0x7fff904d7000 -     0x7fff904ddff7  libsystem_networkextension.dylib (167.1.10) <29AB225B-D7FB-30ED-9600-65D44B9A9442> /usr/lib/system/libsystem_networkextension.dylib
    0x7fff90e99000 -     0x7fff90e9bff7  libsystem_sandbox.dylib (358.1.1) <DB9962EF-8898-31CC-9B87-E01F8CE74C9D> /usr/lib/system/libsystem_sandbox.dylib
    0x7fff9211c000 -     0x7fff92132ff7  libsystem_asl.dylib (267) <F153AC5B-0542-356E-88C8-20A62CA704E2> /usr/lib/system/libsystem_asl.dylib
    0x7fff92133000 -     0x7fff92179ff7  libauto.dylib (186) <A260789B-D4D8-316A-9490-254767B8A5F1> /usr/lib/libauto.dylib
    0x7fff933ee000 -     0x7fff933f1ff7  libdyld.dylib (353.2.1) <19FAF435-C165-3374-9DEF-D7BBA7D61DB6> /usr/lib/system/libdyld.dylib
    0x7fff933f2000 -     0x7fff93446fff  libc++.1.dylib (120) <1B9530FD-989B-3174-BB1C-BDC159501710> /usr/lib/libc++.1.dylib
    0x7fff93668000 -     0x7fff93690fff  libxpc.dylib (559.1.22) <9437C02E-A07B-38C8-91CB-299FAA63083D> /usr/lib/system/libxpc.dylib
    0x7fff9374f000 -     0x7fff93757ffb  libcopyfile.dylib (118.1.2) <0C68D3A6-ACDD-3EF3-991A-CC82C32AB836> /usr/lib/system/libcopyfile.dylib
    0x7fff941e6000 -     0x7fff941e6ff7  libunc.dylib (29) <5676F7EA-C1DF-329F-B006-D2C3022B7D70> /usr/lib/system/libunc.dylib
    0x7fff94582000 -     0x7fff94586fff  libcache.dylib (69) <45E9A2E7-99C4-36B2-BEE3-0C4E11614AD1> /usr/lib/system/libcache.dylib
    0x7fff94d36000 -     0x7fff94d3efff  libsystem_dnssd.dylib (561.1.1) <62B70ECA-E40D-3C63-896E-7F00EC386DDB> /usr/lib/system/libsystem_dnssd.dylib
    0x7fff95b73000 -     0x7fff95b74fff  libSystem.B.dylib (1213) <DA954461-EC6A-3DF0-8551-6FC810627627> /usr/lib/libSystem.B.dylib
    0x7fff95fe1000 -     0x7fff95ffefff  libsystem_kernel.dylib (2782.1.97) <93E0E0A9-75B6-3904-BB4E-4BC7C05F4B6B> /usr/lib/system/libsystem_kernel.dylib
    0x7fff96030000 -     0x7fff96031ffb  libremovefile.dylib (35) <3485B5F4-6CE8-3C62-8DFD-8736ED6E8531> /usr/lib/system/libremovefile.dylib
    0x7fff961a5000 -     0x7fff961b6ff7  libsystem_coretls.dylib (35.1.2) <EBBF7EF6-80D8-3F8F-825C-B412BD6D22C0> /usr/lib/system/libsystem_coretls.dylib
    0x7fff961c0000 -     0x7fff961c5ff7  libunwind.dylib (35.3) <BE7E51A0-B6EA-3A54-9CCA-9D88F683A6D6> /usr/lib/system/libunwind.dylib
    0x7fff965b4000 -     0x7fff96799267  libobjc.A.dylib (646) <3B60CD90-74A2-3A5D-9686-B0772159792A> /usr/lib/libobjc.A.dylib
    0x7fff9679a000 -     0x7fff967c5fff  libc++abi.dylib (125) <88A22A0F-87C6-3002-BFBA-AC0F2808B8B9> /usr/lib/libc++abi.dylib
    0x7fff96899000 -     0x7fff9689dfff  libsystem_stats.dylib (163.1.4) <1DB04436-5974-3F16-86CC-5FF5F390339C> /usr/lib/system/libsystem_stats.dylib
    0x7fff969b7000 -     0x7fff969d3ff7  libsystem_malloc.dylib (53.1.1) <19BCC257-5717-3502-A71F-95D65AFA861B> /usr/lib/system/libsystem_malloc.dylib
    0x7fff96d41000 -     0x7fff96db7fe7  libcorecrypto.dylib (233.1.2) <E1789801-3985-3949-B736-6B3378873301> /usr/lib/system/libcorecrypto.dylib
    0x7fff96eee000 -     0x7fff96eeffff  libDiagnosticMessagesClient.dylib (100) <2EE8E436-5CDC-34C5-9959-5BA218D507FB> /usr/lib/libDiagnosticMessagesClient.dylib
    0x7fff986e3000 -     0x7fff986e5ff7  libsystem_coreservices.dylib (9) <41B7C578-5A53-31C8-A96F-C73E030B0938> /usr/lib/system/libsystem_coreservices.dylib
    0x7fff986e6000 -     0x7fff986e8ff7  libquarantine.dylib (76) <DC041627-2D92-361C-BABF-A869A5C72293> /usr/lib/system/libquarantine.dylib
    0x7fff9990c000 -     0x7fff99914fff  libsystem_platform.dylib (63) <64E34079-D712-3D66-9CE2-418624A5C040> /usr/lib/system/libsystem_platform.dylib
    0x7fff99db4000 -     0x7fff99dbdfff  libsystem_pthread.dylib (105.1.4) <26B1897F-0CD3-30F3-B55A-37CB45062D73> /usr/lib/system/libsystem_pthread.dylib
    0x7fff99e03000 -     0x7fff99e05fff  libsystem_configuration.dylib (699.1.5) <9FBA1CE4-97D0-347E-A443-93ED94512E92> /usr/lib/system/libsystem_configuration.dylib
    0x7fff99e07000 -     0x7fff99e93fff  libsystem_c.dylib (1044.1.2) <C185E862-7424-3210-B528-6B822577A4B8> /usr/lib/system/libsystem_c.dylib
    0x7fff9a404000 -     0x7fff9a42cfff  libsystem_info.dylib (459) <B85A85D5-8530-3A93-B0C3-4DEC41F79478> /usr/lib/system/libsystem_info.dylib
    0x7fff9b091000 -     0x7fff9b091ff7  libkeymgr.dylib (28) <77845842-DE70-3CC5-BD01-C3D14227CED5> /usr/lib/system/libkeymgr.dylib
    0x7fff9c2b9000 -     0x7fff9c2c0ff7  libcompiler_rt.dylib (35) <BF8FC133-EE10-3DA6-9B90-92039E28678F> /usr/lib/system/libcompiler_rt.dylib
    0x7fff9cd4d000 -     0x7fff9cd52ff7  libmacho.dylib (862) <126CA2ED-DE91-308F-8881-B9DAEC3C63B6> /usr/lib/system/libmacho.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 1
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 49551384
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=78.4M resident=49.5M(63%) swapped_out_or_unallocated=28.9M(37%)
Writable regions: Total=204.1M written=42.0M(21%) resident=42.1M(21%) swapped_out=0K(0%) unallocated=162.1M(79%)

REGION TYPE                      VIRTUAL
===========                      =======
Kernel Alloc Once                     4K
MALLOC                            129.3M
MALLOC (admin)                       16K
STACK GUARD                        56.0M
Stack                              9232K
VM_ALLOCATE                        65.5M
__DATA                              812K
__LINKEDIT                         70.9M
__TEXT                             7644K
shared memory                         4K
===========                      =======
TOTAL                             339.1M

Int Memory Size

Memory size is int. This dont allow memory 2GB or more (due to, int is signed and maximum is before the 2GB).

It must be unsigned!

Some errors trying to build with x86_64

Hi,
just trying to build on 64 bit with jit on Ubuntu 15.04 and getting some casting errors:

./configure --enable-cpu=jitc_x86_64 && make
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
*** GNU, building POSIX version. we need pthread and rt.
*** x86_64 target system
checking for ranlib... ranlib
checking for gmake... no
checking for make... /usr/bin/make
checking whether /usr/bin/make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by /usr/bin/make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking dependency style of gcc... gcc3
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking for bison... bison -y
checking for ar... /usr/bin/ar
checking for gar... (cached) /usr/bin/ar
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for clock_settime in -lrt... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for X... libraries , headers 
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for XOpenDisplay in -lX11... yes
checking for gettimeofday... yes
checking for memset... yes
checking for setenv... yes
checking for log2... no
checking for log2 in math.h... yes
checking for exp2... no
checking for exp2 in math.h... yes
checking for ANSI C header files... (cached) yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking asm/types.h usability... yes
checking asm/types.h presence... yes
checking for asm/types.h... yes
checking for stdint.h... (cached) yes
checking for asm/types.h... (cached) yes
checking for linux/netlink.h... yes
checking for an ANSI C-conforming const... yes
checking size of char... 1
checking size of short... 2
checking size of int... 4
checking size of long int... 8
checking size of long long... 8
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating scripts/Makefile
config.status: creating src/Makefile
config.status: creating src/cpu/Makefile
config.status: creating src/cpu/cpu_generic/Makefile
config.status: creating src/cpu/cpu_jitc_x86/Makefile
config.status: creating src/cpu/cpu_jitc_x86_64/Makefile
config.status: creating src/debug/Makefile
config.status: creating src/io/Makefile
config.status: creating src/io/3c90x/Makefile
config.status: creating src/io/ide/Makefile
config.status: creating src/io/graphic/Makefile
config.status: creating src/io/rtl8139/Makefile
config.status: creating src/io/prom/Makefile
config.status: creating src/io/prom/fs/Makefile
config.status: creating src/io/prom/fs/hfs/Makefile
config.status: creating src/io/prom/fs/hfsplus/Makefile
config.status: creating src/io/cuda/Makefile
config.status: creating src/io/pci/Makefile
config.status: creating src/io/pic/Makefile
config.status: creating src/io/macio/Makefile
config.status: creating src/io/nvram/Makefile
config.status: creating src/io/usb/Makefile
config.status: creating src/io/serial/Makefile
config.status: creating src/system/Makefile
config.status: creating src/system/arch/Makefile
config.status: creating src/system/arch/x86/Makefile
config.status: creating src/system/arch/x86_64/Makefile
config.status: creating src/system/arch/generic/Makefile
config.status: creating src/system/osapi/Makefile
config.status: creating src/system/osapi/beos/Makefile
config.status: creating src/system/osapi/posix/Makefile
config.status: creating src/system/osapi/win32/Makefile
config.status: creating src/system/ui/Makefile
config.status: creating src/system/ui/beos/Makefile
config.status: creating src/system/ui/gtk/Makefile
config.status: creating src/system/ui/qt/Makefile
config.status: creating src/system/ui/sdl/Makefile
config.status: creating src/system/ui/win32/Makefile
config.status: creating src/system/ui/x11/Makefile
config.status: creating src/tools/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

./configure successful.

================================================================================
                             Configuration summary
================================================================================

cpu emulation method:                cpu_jitc_x86
compiled for architecture:           x86_64
compiled for OS-API:                 posix
compiled for UI system:              x11
enable debug:                        yes
enable profiling:                    no
make release build:                  yes
omit frame pointer:                  yes
final C compiler flags:               -Wundef -Wall -fsigned-char -O3 -fomit-frame-pointer -g -fno-inline -pthread -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pipe
final C++ compiler flags:             -Wundef -Wall -Woverloaded-virtual -std=c++11 -fsigned-char -O3 -fomit-frame-pointer -g -fno-inline -pthread -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pipe
final linker flags:                   
final linker add:                     -lpthread -lrt -lrt -lX11

================================================================================
/usr/bin/make  all-recursive
make[1]: Entering directory '/mnt/data/home/stu/projects/external/pearpc'
Making all in doc
make[2]: Entering directory '/mnt/data/home/stu/projects/external/pearpc/doc'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/mnt/data/home/stu/projects/external/pearpc/doc'
Making all in src
make[2]: Entering directory '/mnt/data/home/stu/projects/external/pearpc/src'
Making all in cpu
make[3]: Entering directory '/mnt/data/home/stu/projects/external/pearpc/src/cpu'
Making all in cpu_jitc_x86
make[4]: Entering directory '/mnt/data/home/stu/projects/external/pearpc/src/cpu/cpu_jitc_x86'
g++ -DHAVE_CONFIG_H -I. -I../../..  -I ../..   -Wundef -Wall -Woverloaded-virtual -std=c++11 -fsigned-char -O3 -fomit-frame-pointer -g -fno-inline -pthread -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -MT ppc_alu.o -MD -MP -MF .deps/ppc_alu.Tpo -c -o ppc_alu.o ppc_alu.cc
In file included from jitc.h:25:0,
                 from ppc_alu.cc:29:
x86asm.h: In function ‘void asmALU32(X86ALUopc, const void*, uint32)’:
x86asm.h:237:35: error: cast from ‘const void*’ to ‘uint32 {aka unsigned int}’ loses precision [-fpermissive]
   asmALU32(opc, REG_NO, uint32(mem), imm);
                                   ^
x86asm.h: In function ‘void asmALU32(X86ALUopc, const void*, NativeReg)’:
x86asm.h:242:35: error: cast from ‘const void*’ to ‘uint32 {aka unsigned int}’ loses precision [-fpermissive]
   asmALU32(opc, REG_NO, uint32(mem), reg);
                                   ^
x86asm.h: In function ‘void asmALU32(X86ALUopc, NativeReg, const void*)’:
x86asm.h:247:40: error: cast from ‘const void*’ to ‘uint32 {aka unsigned int}’ loses precision [-fpermissive]
   asmALU32(opc, reg, REG_NO, uint32(mem));
                                        ^
x86asm.h: In function ‘void asmALU8(X86ALUopc, const void*, uint8)’:
x86asm.h:264:34: error: cast from ‘const void*’ to ‘uint32 {aka unsigned int}’ loses precision [-fpermissive]
   asmALU8(opc, REG_NO, uint32(mem), imm);
                                  ^
x86asm.h: In function ‘void asmALU8(X86ALUopc, NativeReg8, const void*)’:
x86asm.h:269:40: error: cast from ‘const void*’ to ‘uint32 {aka unsigned int}’ loses precision [-fpermissive]
   asmALU8(opc, reg1, REG_NO, uint32(mem));
                                        ^
x86asm.h: In function ‘void asmALU8(X86ALUopc, const void*, NativeReg8)’:
x86asm.h:274:34: error: cast from ‘const void*’ to ‘uint32 {aka unsigned int}’ loses precision [-fpermissive]
   asmALU8(opc, REG_NO, uint32(mem), reg1);
                                  ^
x86asm.h: In function ‘void asmAND32(const void*, uint32)’:
x86asm.h:280:30: error: cast from ‘const void*’ to ‘uint32 {aka unsigned int}’ loses precision [-fpermissive]
   asmAND32(REG_NO, uint32(mem), imm);
                              ^
x86asm.h: In function ‘void asmOR32(const void*, uint32)’:
x86asm.h:286:29: error: cast from ‘const void*’ to ‘uint32 {aka unsigned int}’ loses precision [-fpermissive]
   asmOR32(REG_NO, uint32(mem), imm);
                             ^
x86asm.h: In function ‘void asmTEST32(const void*, uint32)’:
x86asm.h:292:31: error: cast from ‘const void*’ to ‘uint32 {aka unsigned int}’ loses precision [-fpermissive]
   asmTEST32(REG_NO, uint32(mem), imm);
                               ^
x86asm.h: In function ‘void asmCMOV32(X86FlagTest, NativeReg, const void*)’:
x86asm.h:299:44: error: cast from ‘const void*’ to ‘uint32 {aka unsigned int}’ loses precision [-fpermissive]
   asmCMOV32(flags, reg1, REG_NO, uint32(mem));
                                            ^
x86asm.h: In function ‘void asmSET8(X86FlagTest, const void*)’:
x86asm.h:306:36: error: cast from ‘const void*’ to ‘uint32 {aka unsigned int}’ loses precision [-fpermissive]
   asmSET8(flags, REG_NO, uint32(mem));
                                    ^
In file included from jitc.h:25:0,
                 from ppc_alu.cc:29:
x86asm.h: In function ‘void asmALUPS(X86ALUPSopc, NativeVectorReg, const void*)’:
x86asm.h:598:40: error: cast from ‘const void*’ to ‘uint32 {aka unsigned int}’ loses precision [-fpermissive]
  asmALUPS(opc, reg1, REG_NO, uint32(mem));
                                        ^
Makefile:400: recipe for target 'ppc_alu.o' failed
make[4]: *** [ppc_alu.o] Error 1
make[4]: Leaving directory '/mnt/data/home/stu/projects/external/pearpc/src/cpu/cpu_jitc_x86'
Makefile:351: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/mnt/data/home/stu/projects/external/pearpc/src/cpu'
Makefile:502: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/mnt/data/home/stu/projects/external/pearpc/src'
Makefile:389: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/mnt/data/home/stu/projects/external/pearpc'
Makefile:329: recipe for target 'all' failed
make: *** [all] Error 2

Something causing build fail

I wasn't wanting to open an Issue but:
I went along with the previous issues (building win32) and the build stopped here.

[Link expired, I'll look into this again and see if I can resolve it myself]

GCC stopped permitting referencing a packed field.

ppc_fpu.cc: In function ‘void ppc_opc_frsqrtex(PPC_CPU_State&)’:
ppc_fpu.cc:1870:63: error: cannot bind packed field ‘aCPU.PPC_CPU_State::fpr[frD]’ to ‘uint64&’ {aka ‘long unsigned int&’}
 1870 |  aCPU.fpscr |= ppc_fpu_pack_double(aCPU.fpscr, D, aCPU.fpr[frD]);
      |                                                   ~~~~~~~~~~~~^

Apparently, the C++ standards changed at some point, and referencing into a packed struct, means that you cannot guarantee alignment, which could cause issues on some architectures that do not permit unaligned accesses, so GCC decided that this dictates that the code should be prevented from compiling.

GCC version info:

pearpc$ g++ --version
g++ (SUSE Linux) 9.1.1 20190611 [gcc-9-branch revision 272147]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.