Linux header fixes

This commit is contained in:
Dr. Chat 2017-02-05 22:45:01 -06:00
parent 4f46c51fe3
commit 803f0be049
11 changed files with 24 additions and 9 deletions

View File

@ -9,6 +9,8 @@
#include "xenia/cpu/backend/x64/x64_backend.h" #include "xenia/cpu/backend/x64/x64_backend.h"
#include <stddef.h>
#include "third_party/capstone/include/capstone.h" #include "third_party/capstone/include/capstone.h"
#include "third_party/capstone/include/x86.h" #include "third_party/capstone/include/x86.h"
#include "xenia/base/exception_handler.h" #include "xenia/base/exception_handler.h"

View File

@ -13,6 +13,7 @@
#include <climits> #include <climits>
#include <cstring> #include <cstring>
#include <stddef.h>
#include "xenia/base/assert.h" #include "xenia/base/assert.h"
#include "xenia/base/atomic.h" #include "xenia/base/atomic.h"

View File

@ -10,6 +10,7 @@
#include "xenia/cpu/hir/value.h" #include "xenia/cpu/hir/value.h"
#include <cmath> #include <cmath>
#include <cstdlib>
#include "xenia/base/assert.h" #include "xenia/base/assert.h"
#include "xenia/base/byte_order.h" #include "xenia/base/byte_order.h"
@ -1330,7 +1331,7 @@ void Value::VectorSub(Value* other, TypeName type, bool is_unsigned,
void Value::DotProduct3(Value* other) { void Value::DotProduct3(Value* other) {
assert_true(this->type == VEC128_TYPE && other->type == VEC128_TYPE); assert_true(this->type == VEC128_TYPE && other->type == VEC128_TYPE);
switch (type) { switch (type) {
case VEC128_TYPE: case VEC128_TYPE: {
alignas(16) float result[4]; alignas(16) float result[4];
__m128 src1 = _mm_load_ps(constant.v128.f32); __m128 src1 = _mm_load_ps(constant.v128.f32);
__m128 src2 = _mm_load_ps(other->constant.v128.f32); __m128 src2 = _mm_load_ps(other->constant.v128.f32);
@ -1339,7 +1340,7 @@ void Value::DotProduct3(Value* other) {
// TODO(rick): is this sane? // TODO(rick): is this sane?
type = FLOAT32_TYPE; type = FLOAT32_TYPE;
constant.f32 = result[0]; constant.f32 = result[0];
break; } break;
default: default:
assert_unhandled_case(type); assert_unhandled_case(type);
break; break;
@ -1349,7 +1350,7 @@ void Value::DotProduct3(Value* other) {
void Value::DotProduct4(Value* other) { void Value::DotProduct4(Value* other) {
assert_true(this->type == VEC128_TYPE && other->type == VEC128_TYPE); assert_true(this->type == VEC128_TYPE && other->type == VEC128_TYPE);
switch (type) { switch (type) {
case VEC128_TYPE: case VEC128_TYPE: {
alignas(16) float result[4]; alignas(16) float result[4];
__m128 src1 = _mm_load_ps(constant.v128.f32); __m128 src1 = _mm_load_ps(constant.v128.f32);
__m128 src2 = _mm_load_ps(other->constant.v128.f32); __m128 src2 = _mm_load_ps(other->constant.v128.f32);
@ -1358,7 +1359,7 @@ void Value::DotProduct4(Value* other) {
// TODO(rick): is this sane? // TODO(rick): is this sane?
type = FLOAT32_TYPE; type = FLOAT32_TYPE;
constant.f32 = result[0]; constant.f32 = result[0];
break; } break;
default: default:
assert_unhandled_case(type); assert_unhandled_case(type);
break; break;

View File

@ -15,6 +15,8 @@
#include "xenia/cpu/ppc/ppc_frontend.h" #include "xenia/cpu/ppc/ppc_frontend.h"
#include "xenia/cpu/ppc/ppc_hir_builder.h" #include "xenia/cpu/ppc/ppc_hir_builder.h"
#include <stddef.h>
namespace xe { namespace xe {
namespace cpu { namespace cpu {
namespace ppc { namespace ppc {

View File

@ -13,6 +13,8 @@
#include "xenia/cpu/ppc/ppc_context.h" #include "xenia/cpu/ppc/ppc_context.h"
#include "xenia/cpu/ppc/ppc_hir_builder.h" #include "xenia/cpu/ppc/ppc_hir_builder.h"
#include <stddef.h>
namespace xe { namespace xe {
namespace cpu { namespace cpu {
namespace ppc { namespace ppc {
@ -349,7 +351,7 @@ int InstrEmit_mtfsfx(PPCHIRBuilder& f, const InstrData& i) {
// i.XFL.W; // i.XFL.W;
// i.XFL.FM; // i.XFL.FM;
f.StoreFPSCR( f.StoreFPSCR(
f.Truncate(f.Cast(f.LoadFPR(i.XFL.RB), INT64_TYPE), INT32_TYPE)); f.Truncate(f.Cast(f.LoadFPR(i.XFL.RB), INT64_TYPE), INT32_TYPE));
} }
if (i.XFL.Rc) { if (i.XFL.Rc) {
f.CopyFPSCRToCR1(); f.CopyFPSCRToCR1();

View File

@ -13,6 +13,8 @@
#include "xenia/cpu/ppc/ppc_context.h" #include "xenia/cpu/ppc/ppc_context.h"
#include "xenia/cpu/ppc/ppc_hir_builder.h" #include "xenia/cpu/ppc/ppc_hir_builder.h"
#include <stddef.h>
namespace xe { namespace xe {
namespace cpu { namespace cpu {
namespace ppc { namespace ppc {

View File

@ -10,6 +10,7 @@
#include "xenia/cpu/ppc/ppc_hir_builder.h" #include "xenia/cpu/ppc/ppc_hir_builder.h"
#include <cstring> #include <cstring>
#include <stddef.h>
#include "xenia/base/byte_order.h" #include "xenia/base/byte_order.h"
#include "xenia/base/logging.h" #include "xenia/base/logging.h"

View File

@ -1,9 +1,10 @@
// This code was autogenerated by tools/ppc-table-gen.py. Do not modify! // This code was autogenerated by ./tools/ppc-table-gen. Do not modify!
// clang-format off // clang-format off
#ifndef XENIA_CPU_PPC_PPC_OPCODE_H_ #ifndef XENIA_CPU_PPC_PPC_OPCODE_H_
#define XENIA_CPU_PPC_PPC_OPCODE_H_ #define XENIA_CPU_PPC_PPC_OPCODE_H_
#include <cstdint> #include <cstdint>
#include <cstdlib>
namespace xe { namespace xe {
namespace cpu { namespace cpu {

View File

@ -1,6 +1,7 @@
// This code was autogenerated by tools/ppc-table-gen.py. Do not modify! // This code was autogenerated by ./tools/ppc-table-gen. Do not modify!
// clang-format off // clang-format off
#include <cstdint> #include <cstdint>
#include <cstdlib>
#include "xenia/base/assert.h" #include "xenia/base/assert.h"
#include "xenia/cpu/ppc/ppc_decode_data.h" #include "xenia/cpu/ppc/ppc_decode_data.h"

View File

@ -1,6 +1,7 @@
// This code was autogenerated by tools/ppc-table-gen.py. Do not modify! // This code was autogenerated by ./tools/ppc-table-gen. Do not modify!
// clang-format off // clang-format off
#include <cstdint> #include <cstdint>
#include <cstdlib>
#include "xenia/base/assert.h" #include "xenia/base/assert.h"
#include "xenia/cpu/ppc/ppc_opcode.h" #include "xenia/cpu/ppc/ppc_opcode.h"

View File

@ -1,6 +1,7 @@
// This code was autogenerated by tools/ppc-table-gen.py. Do not modify! // This code was autogenerated by ./tools/ppc-table-gen. Do not modify!
// clang-format off // clang-format off
#include <cstdint> #include <cstdint>
#include <cstdlib>
#include "xenia/base/assert.h" #include "xenia/base/assert.h"
#include "xenia/cpu/ppc/ppc_opcode.h" #include "xenia/cpu/ppc/ppc_opcode.h"