Skip to content

Commit

Permalink
Use LLVM 7 (master)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nekotekina committed Jul 5, 2018
1 parent 1ac203a commit e009bba
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ install:
fi;
# Download pre-compiled LLVM libs
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
wget https://github.com/RPCS3/llvm/releases/download/continuous-linux-release_60/llvmlibs-linux.tar.gz;
wget https://github.com/RPCS3/llvm/releases/download/continuous-linux-master/llvmlibs-linux.tar.gz;
mkdir llvmlibs;
tar -xzf ./llvmlibs-linux.tar.gz -C llvmlibs;
fi;
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RPCS3

The world's first open-source PlayStation 3 emulator/debugger written in C++ for Windows and Linux.

You can find some basic information in our [**website**](https://rpcs3.net/).
You can find some basic information in our [**website**](https://rpcs3.net/).
For discussion about this emulator and PS3 emulation please visit our [**forums**](https://forums.rpcs3.net) and our [**Discord server**](https://discord.me/RPCS3).

[**Support Lead Developers Nekotekina and kd-11 on Patreon**](https://www.patreon.com/Nekotekina)
Expand Down Expand Up @@ -51,20 +51,20 @@ To initialize the repository don't forget to execute `git submodule update --ini

### Configuring Qt

*If you're using Visual Studio 2017 without Qt plugin support (or simply dont want to use it):*
*If you're using Visual Studio 2017 without Qt plugin support (or simply dont want to use it):*
1) Add `QTDIR` environment variable and set it to e.g `<QtInstallFolder>\5.11.1\msvc2015_64\`

Open `rpcs3.sln`


*If you wish to use the Visual Studio plugin for Qt:* </br>
1) Go to the Qt5 menu and edit Qt5 options. Add the path to your Qt installation with compiler e.g. `C:\Qt\5.11.1\msvc2015_64`.
2) While selecting the rpcs3qt project, go to Qt5->Project Setting and select the version you added.
2) While selecting the rpcs3qt project, go to Qt5->Project Setting and select the version you added.

### Building the projects
The recommended build configuration is Release - LLVM, for all purposes.

You may want to download precompiled [LLVM lib](https://github.com/RPCS3/llvm/releases/download/continuous-release_60/llvmlibs.7z) and extract to root rpcs3 folder (which contains `rpcs3.sln`), as well as download and extract [additional libs](https://drive.google.com/uc?export=download&id=1A2eOMmCO714i0U7J0qI4aEMKnuWl8l_R) to `lib\%CONFIGURATION%-x64\` to speed up compilation time (unoptimised/debug libs are currently not available precompiled).
You may want to download precompiled [LLVM lib](https://github.com/RPCS3/llvm/releases/download/continuous-master/llvmlibs.7z) and extract to root rpcs3 folder (which contains `rpcs3.sln`), as well as download and extract [additional libs](https://drive.google.com/uc?export=download&id=1A2eOMmCO714i0U7J0qI4aEMKnuWl8l_R) to `lib\%CONFIGURATION%-x64\` to speed up compilation time (unoptimised/debug libs are currently not available precompiled).

If you're not using precompiled libs, build the projects in *__BUILD_BEFORE* folder: right-click on every project > *Build*.

Expand Down Expand Up @@ -92,22 +92,22 @@ When using GDB, configure it to ignore SIGSEGV signal (`handle SIGSEGV nostop no

## CMake Build Options (Linux & Mac OS)

- ```-DUSE_SYSTEM_LIBPNG=ON/OFF``` (default = *OFF*)
- ```-DUSE_SYSTEM_LIBPNG=ON/OFF``` (default = *OFF*)
Build against the shared libpng instead of using the builtin one. libpng 1.6+ highly recommended. Try this option if you get version conflict errors or only see black game icons.

- ```-DUSE_SYSTEM_FFMPEG=ON/OFF``` (default = *OFF*)
- ```-DUSE_SYSTEM_FFMPEG=ON/OFF``` (default = *OFF*)
Build against the shared ffmpeg libraries instead of using the builtin patched version. Try this if the builtin version breaks the OpenGL renderer for you.

- ```-DWITHOUT_LLVM=ON/OFF``` (default = *OFF*)
- ```-DWITHOUT_LLVM=ON/OFF``` (default = *OFF*)
This forces RPCS3 to build without LLVM, not recommended.

- ```-DWITH_GDB=ON/OFF``` (default = *OFF*)
- ```-DWITH_GDB=ON/OFF``` (default = *OFF*)
This Builds RPCS3 with support for debugging PS3 games using gdb.

- ```-DUSE_VULKAN=ON/OFF``` (default = *ON*)
- ```-DUSE_VULKAN=ON/OFF``` (default = *ON*)
This builds RPCS3 with Vulkan support.

- ```-DUSE_NATIVE_INSTRUCTIONS=ON/OFF``` (default = *ON*)
- ```-DUSE_NATIVE_INSTRUCTIONS=ON/OFF``` (default = *ON*)
This builds rpcs3 with -march=native, which is useful for local builds, but not good for packages.

## License
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ image: Visual Studio 2015

environment:
QTDIR: C:\Qt\5.11\msvc2015_64
LLVMLIBS: https://github.com/RPCS3/llvm/releases/download/continuous-release_60/llvmlibs.7z
LLVMLIBS: https://github.com/RPCS3/llvm/releases/download/continuous-master/llvmlibs.7z
GLSLANG: https://drive.google.com/uc?export=download&id=1nJK_NEeRzJ_r_u4zWLySwLmMrV8ZO_wL
COMPATDB: https://rpcs3.net/compatibility?api=v1&export
VULKAN_SDK: "C:\\VulkanSDK\\1.1.73.0"
Expand Down Expand Up @@ -127,7 +127,7 @@ artifacts:
name: openssl
- path: openssl_win64.7z.sha256
name: openssl sha256 hash

deploy:
provider: GitHub
# Description is a semi-colon seperated list for easy parsing
Expand Down
2 changes: 1 addition & 1 deletion llvm
Submodule llvm updated 11065 files
4 changes: 2 additions & 2 deletions rpcs3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ find_package(OpenGL REQUIRED)
find_package(OpenAL REQUIRED)
if(NOT WITHOUT_LLVM)
if (EXISTS "${CMAKE_SOURCE_DIR}/llvmlibs")
find_package(LLVM 6.0 CONFIG)
find_package(LLVM 7.0 CONFIG)
endif()
if(NOT LLVM_FOUND)
message("LLVM will be built from the submodule.")
Expand All @@ -212,7 +212,7 @@ if(NOT WITHOUT_LLVM)
set(LLVM_DIR "${CMAKE_CURRENT_BINARY_DIR}/../llvm_build/lib/cmake/llvm/")

# now tries to find LLVM again
find_package(LLVM 6.0 CONFIG)
find_package(LLVM 7.0 CONFIG)
if(NOT LLVM_FOUND)
message(WARNING "Couldn't build LLVM from the submodule. You might need to run `git submodule update --init`")
endif()
Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/PPUTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2631,7 +2631,7 @@ void PPUTranslator::MTOCRF(ppu_opcode_t op)
const auto index = m_ir->CreateAnd(m_ir->CreateLShr(value, 28 - i * 4), 15);
const auto src = m_ir->CreateGEP(m_mtocr_table, {m_ir->getInt32(0), m_ir->CreateShl(index, 2)});
const auto dst = m_ir->CreateBitCast(m_ir->CreateStructGEP(nullptr, m_thread, m_cr - m_locals + i * 4), GetType<u8*>());
Call(GetType<void>(), "llvm.memcpy.p0i8.p0i8.i32", dst, src, m_ir->getInt32(4), m_ir->getInt32(4), m_ir->getFalse());
Call(GetType<void>(), "llvm.memcpy.p0i8.p0i8.i32", dst, src, m_ir->getInt32(4), m_ir->getFalse());
}
}
}
Expand Down Expand Up @@ -3338,7 +3338,7 @@ void PPUTranslator::ICBI(ppu_opcode_t op)
void PPUTranslator::DCBZ(ppu_opcode_t op)
{
const auto ptr = GetMemory(m_ir->CreateAnd(op.ra ? m_ir->CreateAdd(GetGpr(op.ra), GetGpr(op.rb)) : GetGpr(op.rb), -128), GetType<u8>());
Call(GetType<void>(), "llvm.memset.p0i8.i32", ptr, m_ir->getInt8(0), m_ir->getInt32(128), m_ir->getInt32(16), m_ir->getTrue());
Call(GetType<void>(), "llvm.memset.p0i8.i32", ptr, m_ir->getInt8(0), m_ir->getInt32(128), m_ir->getTrue());
}

void PPUTranslator::LWZ(ppu_opcode_t op)
Expand Down

0 comments on commit e009bba

Please sign in to comment.