mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:03:00 +00:00
[SOFTX86]
Fix warnings in softx87 (the FPU emulator). svn path=/branches/ntvdm/; revision=59262
This commit is contained in:
parent
cde3f9547b
commit
6c73fd8066
3 changed files with 10 additions and 11 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
/* get the Softx86 configuration defines and Softx86 headers */
|
/* get the Softx86 configuration defines and Softx86 headers */
|
||||||
#include "softx86.h"
|
#include "softx86.h"
|
||||||
#include <softx86cfg.h>
|
#include "softx86cfg.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -248,10 +248,10 @@ int softx87_setbug(softx87_ctx* ctx,sx87_udword bug_id,sx87_ubyte on_off);
|
||||||
void softx87_normalize(softx87_ctx* ctx,softx87_reg80 *val);
|
void softx87_normalize(softx87_ctx* ctx,softx87_reg80 *val);
|
||||||
|
|
||||||
/* loading/saving */
|
/* loading/saving */
|
||||||
void softx87_unpack_raw_int16(softx87_ctx* ctx,sx87_ubyte *data,softx87_reg80 *v);
|
void softx87_unpack_raw_int16(softx87_ctx* ctx,char *data,softx87_reg80 *v);
|
||||||
void softx87_unpack_raw_int32(softx87_ctx* ctx,sx87_ubyte *data,softx87_reg80 *v);
|
void softx87_unpack_raw_int32(softx87_ctx* ctx,char *data,softx87_reg80 *v);
|
||||||
void softx87_unpack_raw_fp32(softx87_ctx* ctx,sx87_ubyte *data,softx87_reg80 *v);
|
void softx87_unpack_raw_fp32(softx87_ctx* ctx,char *data,softx87_reg80 *v);
|
||||||
void softx87_unpack_raw_fp64(softx87_ctx* ctx,sx87_ubyte *data,softx87_reg80 *v);
|
void softx87_unpack_raw_fp64(softx87_ctx* ctx,char *data,softx87_reg80 *v);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -262,7 +262,7 @@ void softx87_unpack_raw_fp64(softx87_ctx* ctx,sx87_ubyte *data,softx87_reg80 *v)
|
||||||
This function assumes that you want the CPU and FPU to
|
This function assumes that you want the CPU and FPU to
|
||||||
share the same memory. Provided as a service for those
|
share the same memory. Provided as a service for those
|
||||||
who don't want to manually link pointers together and such. */
|
who don't want to manually link pointers together and such. */
|
||||||
static int softx87_connect_to_CPU(softx86_ctx* cpu,softx87_ctx* fpu)
|
static inline int softx87_connect_to_CPU(softx86_ctx* cpu,softx87_ctx* fpu)
|
||||||
{
|
{
|
||||||
if (!cpu || !fpu) return 0;
|
if (!cpu || !fpu) return 0;
|
||||||
|
|
||||||
|
|
1
lib/3rdparty/softx86/softx87/CMakeLists.txt
vendored
1
lib/3rdparty/softx86/softx87/CMakeLists.txt
vendored
|
@ -11,4 +11,3 @@ list(APPEND SOURCE
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(softx87 ${SOURCE})
|
add_library(softx87 ${SOURCE})
|
||||||
allow_warnings(softx87)
|
|
||||||
|
|
8
lib/3rdparty/softx86/softx87/softx87.c
vendored
8
lib/3rdparty/softx86/softx87/softx87.c
vendored
|
@ -354,7 +354,7 @@ void softx87_step_def_on_write_memory(void* _ctx,sx86_udword address,sx86_ubyte
|
||||||
/* loading/storing and conversion code */
|
/* loading/storing and conversion code */
|
||||||
|
|
||||||
/* loads 16-bit integer from data[] */
|
/* loads 16-bit integer from data[] */
|
||||||
void softx87_unpack_raw_int16(softx87_ctx* ctx,sx87_ubyte *data,softx87_reg80 *v)
|
void softx87_unpack_raw_int16(softx87_ctx* ctx,char *data,softx87_reg80 *v)
|
||||||
{
|
{
|
||||||
#if SX86_BYTE_ORDER == LE
|
#if SX86_BYTE_ORDER == LE
|
||||||
v->mantissa = (sx87_uldword)(*((sx87_uword*)data));
|
v->mantissa = (sx87_uldword)(*((sx87_uword*)data));
|
||||||
|
@ -374,7 +374,7 @@ void softx87_unpack_raw_int16(softx87_ctx* ctx,sx87_ubyte *data,softx87_reg80 *v
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loads 32-bit integer from data[] */
|
/* loads 32-bit integer from data[] */
|
||||||
void softx87_unpack_raw_int32(softx87_ctx* ctx,sx87_ubyte *data,softx87_reg80 *v)
|
void softx87_unpack_raw_int32(softx87_ctx* ctx,char *data,softx87_reg80 *v)
|
||||||
{
|
{
|
||||||
#if SX86_BYTE_ORDER == LE
|
#if SX86_BYTE_ORDER == LE
|
||||||
v->mantissa = (sx87_uldword)(*((sx87_udword*)data));
|
v->mantissa = (sx87_uldword)(*((sx87_udword*)data));
|
||||||
|
@ -396,7 +396,7 @@ void softx87_unpack_raw_int32(softx87_ctx* ctx,sx87_ubyte *data,softx87_reg80 *v
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loads 32-bit double precision floating point from data[] */
|
/* loads 32-bit double precision floating point from data[] */
|
||||||
void softx87_unpack_raw_fp32(softx87_ctx* ctx,sx87_ubyte *data,softx87_reg80 *v)
|
void softx87_unpack_raw_fp32(softx87_ctx* ctx,char *data,softx87_reg80 *v)
|
||||||
{
|
{
|
||||||
#if SX86_BYTE_ORDER == LE
|
#if SX86_BYTE_ORDER == LE
|
||||||
v->mantissa = (sx87_uldword)(*((sx87_udword*)data));
|
v->mantissa = (sx87_uldword)(*((sx87_udword*)data));
|
||||||
|
@ -419,7 +419,7 @@ void softx87_unpack_raw_fp32(softx87_ctx* ctx,sx87_ubyte *data,softx87_reg80 *v)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loads 64-bit double precision floating point from data[] */
|
/* loads 64-bit double precision floating point from data[] */
|
||||||
void softx87_unpack_raw_fp64(softx87_ctx* ctx,sx87_ubyte *data,softx87_reg80 *v)
|
void softx87_unpack_raw_fp64(softx87_ctx* ctx,char *data,softx87_reg80 *v)
|
||||||
{
|
{
|
||||||
#if SX86_BYTE_ORDER == LE
|
#if SX86_BYTE_ORDER == LE
|
||||||
v->mantissa = *((sx87_uldword*)data);
|
v->mantissa = *((sx87_uldword*)data);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue