From b9fc729928ff76b26cc10456bdc68728fc53732c Mon Sep 17 00:00:00 2001 From: archshift Date: Sun, 27 Apr 2014 22:23:58 -0700 Subject: Problematic template functions --- src/core/hle/function_wrappers.h | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/core') diff --git a/src/core/hle/function_wrappers.h b/src/core/hle/function_wrappers.h index 4897d3f28..cab772004 100644 --- a/src/core/hle/function_wrappers.h +++ b/src/core/hle/function_wrappers.h @@ -83,15 +83,6 @@ template void WrapU_IV() { RETURN(retval); } -template void WrapF_V() { - RETURNF(func()); -} - -// TODO: Not sure about the floating point parameter passing -template void WrapF_IFU() { - RETURNF(func(PARAM(0), PARAMF(0), PARAM(1))); -} - template void WrapU_U() { u32 retval = func(PARAM(0)); RETURN(retval); @@ -127,12 +118,6 @@ template void WrapI_UU() { RETURN(retval); } -template void WrapI_UFF() { - // Not sure about the float arguments. - int retval = func(PARAM(0), PARAMF(0), PARAMF(1)); - RETURN(retval); -} - template void WrapI_UUU() { int retval = func(PARAM(0), PARAM(1), PARAM(2)); RETURN(retval); -- cgit v1.2.3 From a7f3ed003d03c79f83c1c354329e5ce47f6940e7 Mon Sep 17 00:00:00 2001 From: archshift Date: Wed, 30 Apr 2014 16:56:25 -0700 Subject: A bit of Cmake love --- CMakeLists.txt | 11 +++++++---- src/citra/CMakeLists.txt | 12 ++++++------ src/citra_qt/CMakeLists.txt | 4 ++-- src/core/CMakeLists.txt | 39 ++++++++++++++++++++++++++++++++++++++- 4 files changed, 53 insertions(+), 13 deletions(-) (limited to 'src/core') diff --git a/CMakeLists.txt b/CMakeLists.txt index 49c1a384a..6837d36fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,14 @@ IF (APPLE) SET(CMAKE_CXX_FLAGS_RELEASE "-stdlib=libc++") ENDIF (APPLE) +#external includes include_directories(${GLFW_INCLUDE_DIRS}) +include_directories(${OPENGL_INCLUDE_DIR}) +include_directories(${GLEW_INCLUDE_DIR}) + +#use pkg_search_module library dirs +link_directories(${GLFW_LIBRARY_DIRS}) + option(DISABLE_QT4 "Disable Qt4 GUI" OFF) if(NOT DISABLE_QT4) include(FindQt4) @@ -47,10 +54,6 @@ include(GetGitRevisionDescription) get_git_head_revision(GIT_REF_SPEC GIT_REV) git_describe(GIT_DESC --always --long --dirty) git_branch_name(GIT_BRANCH) - -# external includes -include_directories(${OPENGL_INCLUDE_DIR}) -include_directories(${GLEW_INCLUDE_DIR}) # internal includes include_directories(src) diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txt index 25f476895..ee3cb55cf 100644 --- a/src/citra/CMakeLists.txt +++ b/src/citra/CMakeLists.txt @@ -3,12 +3,12 @@ set(SRCS citra.cpp set(HEADS citra.h resource.h) -# NOTE: This is a workaround for CMake bug 0006976 (missing X11_xf86vmode_LIB variable) -if (NOT X11_xf86vmode_LIB) - set(X11_xv86vmode_LIB Xxf86vm) -endif() - add_executable(citra ${SRCS} ${HEADS}) -target_link_libraries(citra core common video_core iconv pthread ${COREFOUNDATION_LIBRARY} ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${GLFW_LIBRARIES}) + +if (APPLE) + target_link_libraries(citra core common video_core iconv pthread ${COREFOUNDATION_LIBRARY} ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${GLFW_LIBRARIES}) +else() + target_link_libraries(citra core common video_core pthread ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${GLFW_LIBRARIES}) +endif() #install(TARGETS citra RUNTIME DESTINATION ${bindir}) diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt index abca202ea..b06be56fe 100644 --- a/src/citra_qt/CMakeLists.txt +++ b/src/citra_qt/CMakeLists.txt @@ -51,9 +51,9 @@ include_directories(./) add_executable(citra-qt ${SRCS} ${HEADS} ${MOC_SRCS} ${UI_HDRS}) if (APPLE) - target_link_libraries(citra-qt core common video_core qhexedit iconv ${COREFOUNDATION_LIBRARY} ${QT_LIBRARIES} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES}) + target_link_libraries(citra-qt core common video_core qhexedit iconv ${COREFOUNDATION_LIBRARY} ${QT_LIBRARIES} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES}) else() - + target_link_libraries(citra-qt core common video_core qhexedit ${QT_LIBRARIES} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES}) endif() #install(TARGETS citra-qt RUNTIME DESTINATION ${bindir}) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 314f6e64c..c8d95ba5d 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -29,4 +29,41 @@ set(SRCS core.cpp hw/lcd.cpp hw/ndma.cpp) -add_library(core STATIC ${SRCS}) +set(HEADS core.h + core_timing.h + loader.h + mem_map.h + system.h + arm/disassembler/arm_disasm.h + arm/interpreter/arm_interpreter.h + arm/interpreter/arm_regformat.h + arm/interpreter/armcpu.h + arm/interpreter/armdefs.h + arm/interpreter/armemu.h + arm/interpreter/armmmu.h + arm/interpreter/armos.h + arm/interpreter/skyeye_defs.h + arm/mmu/arm1176jzf_s_mmu.h + arm/mmu/cache.h + arm/mmu/rb.h + arm/mmu/tlb.h + arm/mmu/wb.h + elf/elf_reader.h + elf/elf_types.h + file_sys/directory_file_system.h + file_sys/file_sys.h + file_sys/meta_file_system.h + hle/hle.h + hle/mrc.h + hle/syscall.h + hle/function_wrappers.h + hle/service/apt.h + hle/service/gsp.h + hle/service/hid.h + hle/service/service.h + hle/service/srv.h + hw/hw.h + hw/lcd.h + hw/ndma.h) + +add_library(core STATIC ${SRCS} ${HEADS}) -- cgit v1.2.3 From 704075f04a8adda82141f3c68addfd6c34a08765 Mon Sep 17 00:00:00 2001 From: archshift Date: Wed, 30 Apr 2014 20:12:01 -0700 Subject: Fixed indents --- src/citra/CMakeLists.txt | 2 +- src/citra/emu_window/emu_window_glfw.cpp | 14 +++---- src/citra_qt/CMakeLists.txt | 2 +- src/citra_qt/bootmanager.cpp | 38 +++++++++--------- src/common/CMakeLists.txt | 2 +- src/core/CMakeLists.txt | 4 +- src/video_core/utils.cpp | 68 ++++++++++++++++---------------- src/video_core/video_core.cpp | 4 +- 8 files changed, 66 insertions(+), 68 deletions(-) (limited to 'src/core') diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txt index 2e4fbe353..7787d6a72 100644 --- a/src/citra/CMakeLists.txt +++ b/src/citra/CMakeLists.txt @@ -13,7 +13,7 @@ add_executable(citra ${SRCS} ${HEADS}) if (APPLE) target_link_libraries(citra core common video_core iconv pthread ${COREFOUNDATION_LIBRARY} ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${GLFW_LIBRARIES}) else() - target_link_libraries(citra core common video_core GLEW pthread X11 Xxf86vm Xi Xcursor ${OPENGL_LIBRARIES} ${GLFW_LIBRARIES} rt ${X11_Xrandr_LIB} ${X11_xv86vmode_LIB}) + target_link_libraries(citra core common video_core GLEW pthread X11 Xxf86vm Xi Xcursor ${OPENGL_LIBRARIES} ${GLFW_LIBRARIES} rt ${X11_Xrandr_LIB} ${X11_xv86vmode_LIB}) endif() #install(TARGETS citra RUNTIME DESTINATION ${bindir}) diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp index ea1499e7c..73c116373 100644 --- a/src/citra/emu_window/emu_window_glfw.cpp +++ b/src/citra/emu_window/emu_window_glfw.cpp @@ -28,17 +28,17 @@ EmuWindow_GLFW::EmuWindow_GLFW() { } glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); - glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); - glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); + glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); m_render_window = glfwCreateWindow(VideoCore::kScreenTopWidth, (VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight), m_window_title.c_str(), NULL, NULL); - if (m_render_window == NULL) { - printf("Failed to create GLFW window! Exiting..."); - exit(1); - } - + if (m_render_window == NULL) { + printf("Failed to create GLFW window! Exiting..."); + exit(1); + } + // Setup callbacks glfwSetWindowUserPointer(m_render_window, this); //glfwSetKeyCallback(m_render_window, OnKeyEvent); diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt index 3a1335544..9d983c0f0 100644 --- a/src/citra_qt/CMakeLists.txt +++ b/src/citra_qt/CMakeLists.txt @@ -53,7 +53,7 @@ add_executable(citra-qt ${SRCS} ${HEADS} ${MOC_SRCS} ${UI_HDRS}) if (APPLE) target_link_libraries(citra-qt core common video_core qhexedit iconv ${COREFOUNDATION_LIBRARY} ${QT_LIBRARIES} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES}) else() - target_link_libraries(citra-qt core common video_core qhexedit ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${SDL2_LIBRARY} rt GLEW ${GLFW_LIBRARIES}) + target_link_libraries(citra-qt core common video_core qhexedit ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${SDL2_LIBRARY} rt GLEW ${GLFW_LIBRARIES}) endif() #install(TARGETS citra-qt RUNTIME DESTINATION ${bindir}) diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index 52b39eb27..bd01b78c5 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -47,7 +47,7 @@ void EmuThread::run() void EmuThread::Stop() { - if (!isRunning()) + if (!isRunning()) { INFO_LOG(MASTER_LOG, "EmuThread::Stop called while emu thread wasn't running, returning..."); return; @@ -62,7 +62,7 @@ void EmuThread::Stop() terminate(); wait(1000); if (isRunning()) - WARN_LOG(MASTER_LOG, "EmuThread STILL running, something is wrong here..."); + WARN_LOG(MASTER_LOG, "EmuThread STILL running, something is wrong here..."); } INFO_LOG(MASTER_LOG, "EmuThread stopped"); } @@ -75,8 +75,8 @@ class GGLWidgetInternal : public QGLWidget public: GGLWidgetInternal(QGLFormat fmt, GRenderWindow* parent) : QGLWidget(parent) { - doneCurrent(); - parent_ = parent; + doneCurrent(); + parent_ = parent; } void paintEvent(QPaintEvent* ev) @@ -102,12 +102,12 @@ EmuThread& GRenderWindow::GetEmuThread() GRenderWindow::GRenderWindow(QWidget* parent) : QWidget(parent), emu_thread(this) { // TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground, WA_DontShowOnScreen, WA_DeleteOnClose - QGLFormat fmt; - fmt.setProfile(QGLFormat::CoreProfile); - fmt.setVersion(4,1); - fmt.setSampleBuffers(true); - fmt.setSamples(4); - + QGLFormat fmt; + fmt.setProfile(QGLFormat::CoreProfile); + fmt.setVersion(4,1); + fmt.setSampleBuffers(true); + fmt.setSamples(4); + child = new GGLWidgetInternal(fmt, this); QBoxLayout* layout = new QHBoxLayout(this); resize(VideoCore::kScreenTopWidth, VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight); @@ -148,12 +148,12 @@ void GRenderWindow::DoneCurrent() void GRenderWindow::PollEvents() { // TODO(ShizZy): Does this belong here? This is a reasonable place to update the window title // from the main thread, but this should probably be in an event handler... - /* - static char title[128]; + /* + static char title[128]; sprintf(title, "%s (FPS: %02.02f)", window_title_.c_str(), video_core::g_renderer->current_fps()); setWindowTitle(title); - */ + */ } void GRenderWindow::BackupGeometry() @@ -186,26 +186,26 @@ QByteArray GRenderWindow::saveGeometry() void GRenderWindow::keyPressEvent(QKeyEvent* event) { - /* - bool key_processed = false; + /* + bool key_processed = false; for (unsigned int channel = 0; channel < 4 && controller_interface(); ++channel) if (controller_interface()->SetControllerStatus(channel, event->key(), input_common::GCController::PRESSED)) key_processed = true; if (!key_processed) QWidget::keyPressEvent(event); - */ + */ } void GRenderWindow::keyReleaseEvent(QKeyEvent* event) { - /* - bool key_processed = false; + /* + bool key_processed = false; for (unsigned int channel = 0; channel < 4 && controller_interface(); ++channel) if (controller_interface()->SetControllerStatus(channel, event->key(), input_common::GCController::RELEASED)) key_processed = true; if (!key_processed) QWidget::keyPressEvent(event); - */ + */ } \ No newline at end of file diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 48f30de4c..ae2331070 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -45,7 +45,7 @@ set(HEADS atomic.h memory_util.h msg_handler.h platform.h - scm_rev.h + scm_rev.h std_condition_variable.h std_mutex.h std_thread.h diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index c8d95ba5d..11b90434d 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -50,10 +50,10 @@ set(HEADS core.h arm/mmu/wb.h elf/elf_reader.h elf/elf_types.h - file_sys/directory_file_system.h + file_sys/directory_file_system.h file_sys/file_sys.h file_sys/meta_file_system.h - hle/hle.h + hle/hle.h hle/mrc.h hle/syscall.h hle/function_wrappers.h diff --git a/src/video_core/utils.cpp b/src/video_core/utils.cpp index 9fcefaad3..29382c814 100644 --- a/src/video_core/utils.cpp +++ b/src/video_core/utils.cpp @@ -8,39 +8,37 @@ #include "video_core/utils.h" namespace VideoCore { - - /** - * Dumps a texture to TGA - * @param filename String filename to dump texture to - * @param width Width of texture in pixels - * @param height Height of texture in pixels - * @param raw_data Raw RGBA8 texture data to dump - * @todo This should be moved to some general purpose/common code - */ - void DumpTGA(std::string filename, int width, int height, u8* raw_data) { - TGAHeader hdr; - FILE* fout; - u8 r, g, b; - - memset(&hdr, 0, sizeof(hdr)); - hdr.datatypecode = 2; // uncompressed RGB - hdr.bitsperpixel = 24; // 24 bpp - hdr.width = width; - hdr.height = height; - - fout = fopen(filename.c_str(), "wb"); - fwrite(&hdr, sizeof(TGAHeader), 1, fout); - for (int i = 0; i < height; i++) { - for (int j = 0; j < width; j++) { - b = raw_data[(3 * (i * width)) + (3 * j) + 0]; - g = raw_data[(3 * (i * width)) + (3 * j) + 1]; - r = raw_data[(3 * (i * width)) + (3 * j) + 2]; - putc(b, fout); - putc(g, fout); - putc(r, fout); - } - } - fclose(fout); - } - + /** + * Dumps a texture to TGA + * @param filename String filename to dump texture to + * @param width Width of texture in pixels + * @param height Height of texture in pixels + * @param raw_data Raw RGBA8 texture data to dump + * @todo This should be moved to some general purpose/common code + */ + void DumpTGA(std::string filename, int width, int height, u8* raw_data) { + TGAHeader hdr; + FILE* fout; + u8 r, g, b; + + memset(&hdr, 0, sizeof(hdr)); + hdr.datatypecode = 2; // uncompressed RGB + hdr.bitsperpixel = 24; // 24 bpp + hdr.width = width; + hdr.height = height; + + fout = fopen(filename.c_str(), "wb"); + fwrite(&hdr, sizeof(TGAHeader), 1, fout); + for (int i = 0; i < height; i++) { + for (int j = 0; j < width; j++) { + b = raw_data[(3 * (i * width)) + (3 * j) + 0]; + g = raw_data[(3 * (i * width)) + (3 * j) + 1]; + r = raw_data[(3 * (i * width)) + (3 * j) + 2]; + putc(b, fout); + putc(g, fout); + putc(r, fout); + } + } + fclose(fout); + } } // namespace \ No newline at end of file diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp index 4e9cd70bc..5f1933b1e 100644 --- a/src/video_core/video_core.cpp +++ b/src/video_core/video_core.cpp @@ -30,8 +30,8 @@ void Start() { /// Initialize the video core void Init(EmuWindow* emu_window) { - glewExperimental = GL_TRUE; - + glewExperimental = GL_TRUE; + g_emu_window = emu_window; g_emu_window->MakeCurrent(); g_renderer = new RendererOpenGL(); -- cgit v1.2.3 From c1394650ff0ab1859b93505771e14c9afdb8aeb3 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 16 May 2014 23:39:27 -0700 Subject: Updated cmakelists --- src/common/CMakeLists.txt | 1 + src/core/CMakeLists.txt | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'src/core') diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index ae2331070..0027ae2b0 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -22,6 +22,7 @@ set(SRCS break_points.cpp set(HEADS atomic.h atomic_gcc.h atomic_win32.h + bit_field.h break_points.h chunk_file.h common_funcs.h diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index f96f04b15..ddf6bf79c 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -49,6 +49,7 @@ set(HEADS core.h mem_map.h system.h arm/disassembler/arm_disasm.h + arm/disassembler/load_symbol_map.h arm/interpreter/arm_interpreter.h arm/interpreter/arm_regformat.h arm/interpreter/armcpu.h @@ -57,18 +58,23 @@ set(HEADS core.h arm/interpreter/armmmu.h arm/interpreter/armos.h arm/interpreter/skyeye_defs.h - arm/mmu/arm1176jzf_s_mmu.h - arm/mmu/cache.h - arm/mmu/rb.h - arm/mmu/tlb.h - arm/mmu/wb.h + arm/interpreter/mmu/arm1176jzf_s_mmu.h + arm/interpreter/mmu/cache.h + arm/interpreter/mmu/rb.h + arm/interpreter/mmu/sa_mmu.h + arm/interpreter/mmu/tlb.h + arm/interpreter/mmu/wb.h + arm/interpreter/vfp/asm_vfp.h + arm/interpreter/vfp/vfp.h + arm/interpreter/vfp/vfp_helper.h elf/elf_reader.h elf/elf_types.h file_sys/directory_file_system.h file_sys/file_sys.h file_sys/meta_file_system.h + hle/config_mem.h + hle/coprocessor.h hle/hle.h - hle/mrc.h hle/syscall.h hle/function_wrappers.h hle/service/apt.h -- cgit v1.2.3 From c396a5ac576c172951e129f19a987398d53dc95c Mon Sep 17 00:00:00 2001 From: archshift Date: Sat, 17 May 2014 10:55:45 -0700 Subject: Fixed vfp issues --- src/core/arm/interpreter/mmu/maverick.cpp | 4 ++-- src/core/arm/interpreter/vfp/vfp_helper.h | 4 ++-- src/core/arm/interpreter/vfp/vfpdouble.cpp | 8 ++++---- src/core/arm/interpreter/vfp/vfpsingle.cpp | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/core') diff --git a/src/core/arm/interpreter/mmu/maverick.cpp b/src/core/arm/interpreter/mmu/maverick.cpp index 0e98ef22b..adcc2efb5 100644 --- a/src/core/arm/interpreter/mmu/maverick.cpp +++ b/src/core/arm/interpreter/mmu/maverick.cpp @@ -86,12 +86,12 @@ static union } reg_conv; static void -printf_nothing (void *foo, ...) +printf_nothing (const char *foo, ...) { } static void -cirrus_not_implemented (char *insn) +cirrus_not_implemented (const char *insn) { fprintf (stderr, "Cirrus instruction '%s' not implemented.\n", insn); fprintf (stderr, "aborting!\n"); diff --git a/src/core/arm/interpreter/vfp/vfp_helper.h b/src/core/arm/interpreter/vfp/vfp_helper.h index 80f9a93f4..b222e79f1 100644 --- a/src/core/arm/interpreter/vfp/vfp_helper.h +++ b/src/core/arm/interpreter/vfp/vfp_helper.h @@ -50,7 +50,7 @@ #define pr_info //printf #define pr_debug //printf -static u32 fls(int x); +static u32 vfp_fls(int x); #define do_div(n, base) {n/=base;} /* From vfpinstr.h */ @@ -508,7 +508,7 @@ struct op { u32 flags; }; -static inline u32 fls(int x) +static u32 vfp_fls(int x) { int r = 32; diff --git a/src/core/arm/interpreter/vfp/vfpdouble.cpp b/src/core/arm/interpreter/vfp/vfpdouble.cpp index cd5b5afa4..7f975cbeb 100644 --- a/src/core/arm/interpreter/vfp/vfpdouble.cpp +++ b/src/core/arm/interpreter/vfp/vfpdouble.cpp @@ -69,9 +69,9 @@ static void vfp_double_dump(const char *str, struct vfp_double *d) static void vfp_double_normalise_denormal(struct vfp_double *vd) { - int bits = 31 - fls(vd->significand >> 32); + int bits = 31 - vfp_fls(vd->significand >> 32); if (bits == 31) - bits = 63 - fls(vd->significand); + bits = 63 - vfp_fls(vd->significand); vfp_double_dump("normalise_denormal: in", vd); @@ -108,9 +108,9 @@ u32 vfp_double_normaliseround(ARMul_State* state, int dd, struct vfp_double *vd, exponent = vd->exponent; significand = vd->significand; - shift = 32 - fls(significand >> 32); + shift = 32 - vfp_fls(significand >> 32); if (shift == 32) - shift = 64 - fls(significand); + shift = 64 - vfp_fls(significand); if (shift) { exponent -= shift; significand <<= shift; diff --git a/src/core/arm/interpreter/vfp/vfpsingle.cpp b/src/core/arm/interpreter/vfp/vfpsingle.cpp index 05279f5ce..602713cff 100644 --- a/src/core/arm/interpreter/vfp/vfpsingle.cpp +++ b/src/core/arm/interpreter/vfp/vfpsingle.cpp @@ -69,7 +69,7 @@ static void vfp_single_dump(const char *str, struct vfp_single *s) static void vfp_single_normalise_denormal(struct vfp_single *vs) { - int bits = 31 - fls(vs->significand); + int bits = 31 - vfp_fls(vs->significand); vfp_single_dump("normalise_denormal: in", vs); @@ -111,7 +111,7 @@ u32 vfp_single_normaliseround(ARMul_State* state, int sd, struct vfp_single *vs, * bit 31, so we have VFP_SINGLE_LOW_BITS + 1 below the least * significant bit. */ - shift = 32 - fls(significand); + shift = 32 - vfp_fls(significand); if (shift < 32 && shift) { exponent -= shift; significand <<= shift; -- cgit v1.2.3 From 403e4bf837c47c7e10dc006fafffea8c160c890f Mon Sep 17 00:00:00 2001 From: archshift Date: Mon, 19 May 2014 15:19:36 -0700 Subject: CMakeLists: rename HEADS, improved comments Changes for clarity of comments, removed redundant compiler flags. --- CMakeLists.txt | 5 ++--- src/citra/CMakeLists.txt | 4 ++-- src/citra_qt/CMakeLists.txt | 4 ++-- src/common/CMakeLists.txt | 4 ++-- src/core/CMakeLists.txt | 4 ++-- src/video_core/CMakeLists.txt | 4 ++-- 6 files changed, 12 insertions(+), 13 deletions(-) (limited to 'src/core') diff --git a/CMakeLists.txt b/CMakeLists.txt index b4665640c..76190c5e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,8 +3,6 @@ cmake_minimum_required(VERSION 2.6) project(citra) SET(CMAKE_CXX_FLAGS "-std=c++11 -fpermissive") -SET(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -fpermissive") -SET(CMAKE_CXX_FLAGS_RELEASE "-std=c++11 -fpermissive") # silence some spam add_definitions(-Wno-attributes) @@ -20,6 +18,7 @@ find_package(GLEW REQUIRED) find_package(OpenGL REQUIRED) pkg_search_module(GLFW REQUIRED glfw3) +# corefoundation is required only on OSX IF (APPLE) FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation) SET(CMAKE_CXX_FLAGS "-stdlib=libc++") @@ -31,7 +30,7 @@ include_directories(${GLFW_INCLUDE_DIRS}) include_directories(${OPENGL_INCLUDE_DIR}) include_directories(${GLEW_INCLUDE_DIR}) -#use pkg_search_module library dirs +# workaround for GLFW linking on OSX link_directories(${GLFW_LIBRARY_DIRS}) option(DISABLE_QT4 "Disable Qt4 GUI" OFF) diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txt index 7787d6a72..1ad607d76 100644 --- a/src/citra/CMakeLists.txt +++ b/src/citra/CMakeLists.txt @@ -1,6 +1,6 @@ set(SRCS citra.cpp emu_window/emu_window_glfw.cpp) -set(HEADS citra.h +set(HEADERS citra.h resource.h) # NOTE: This is a workaround for CMake bug 0006976 (missing X11_xf86vmode_LIB variable) @@ -8,7 +8,7 @@ if (NOT X11_xf86vmode_LIB) set(X11_xv86vmode_LIB Xxf86vm) endif() -add_executable(citra ${SRCS} ${HEADS}) +add_executable(citra ${SRCS} ${HEADERS}) if (APPLE) target_link_libraries(citra core common video_core iconv pthread ${COREFOUNDATION_LIBRARY} ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${GLFW_LIBRARIES}) diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt index 9d983c0f0..549f69217 100644 --- a/src/citra_qt/CMakeLists.txt +++ b/src/citra_qt/CMakeLists.txt @@ -8,7 +8,7 @@ set(SRCS main.cpp config/controller_config.cpp config/controller_config_util.cpp) -set (HEADS +set (HEADERS bootmanager.hxx debugger/callstack.hxx debugger/disassembler.hxx @@ -49,7 +49,7 @@ qt4_wrap_cpp(MOC_SRCS include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(./) -add_executable(citra-qt ${SRCS} ${HEADS} ${MOC_SRCS} ${UI_HDRS}) +add_executable(citra-qt ${SRCS} ${HEADERS} ${MOC_SRCS} ${UI_HDRS}) if (APPLE) target_link_libraries(citra-qt core common video_core qhexedit iconv ${COREFOUNDATION_LIBRARY} ${QT_LIBRARIES} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES}) else() diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 0027ae2b0..aae183393 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -19,7 +19,7 @@ set(SRCS break_points.cpp timer.cpp utf8.cpp) -set(HEADS atomic.h +set(HEADERS atomic.h atomic_gcc.h atomic_win32.h bit_field.h @@ -58,4 +58,4 @@ set(HEADS atomic.h timer.h utf8.h) -add_library(common STATIC ${SRCS} ${HEADS}) +add_library(common STATIC ${SRCS} ${HEADERS}) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index ddf6bf79c..14c598bf3 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -43,7 +43,7 @@ set(SRCS core.cpp hw/lcd.cpp hw/ndma.cpp) -set(HEADS core.h +set(HEADERS core.h core_timing.h loader.h mem_map.h @@ -86,4 +86,4 @@ set(HEADS core.h hw/lcd.h hw/ndma.h) -add_library(core STATIC ${SRCS} ${HEADS}) +add_library(core STATIC ${SRCS} ${HEADERS}) diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index 8d04d381c..e43e6e1bb 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -2,9 +2,9 @@ set(SRCS video_core.cpp utils.cpp renderer_opengl/renderer_opengl.cpp) -set(HEADS video_core.h +set(HEADERS video_core.h utils.h renderer_base.h renderer_opengl/renderer_opengl.h) -add_library(video_core STATIC ${SRCS} ${HEADS}) +add_library(video_core STATIC ${SRCS} ${HEADERS}) -- cgit v1.2.3