mirror of
https://github.com/yuzu-mirror/unicorn.git
synced 2026-04-07 07:24:01 +00:00
fpu: replace LIT64 with UINT64_C macros
In our quest to eliminate the home rolled LIT64 macro we fixup usage inside the softfloat code. While we are at it we remove some of the extraneous spaces to closer fit the house style. Backports commit e932112420f063776f2b9d9e5512830cd6890a7a from qemu
This commit is contained in:
parent
6eb3c9ee79
commit
dbddafe2df
2 changed files with 62 additions and 62 deletions
|
|
@ -616,13 +616,13 @@ static inline uint64_t estimateDiv128To64(uint64_t a0, uint64_t a1, uint64_t b)
|
|||
uint64_t rem0, rem1, term0, term1;
|
||||
uint64_t z;
|
||||
|
||||
if ( b <= a0 ) return LIT64( 0xFFFFFFFFFFFFFFFF );
|
||||
if ( b <= a0 ) return UINT64_C(0xFFFFFFFFFFFFFFFF);
|
||||
b0 = b>>32;
|
||||
z = ( b0<<32 <= a0 ) ? LIT64( 0xFFFFFFFF00000000 ) : ( a0 / b0 )<<32;
|
||||
z = ( b0<<32 <= a0 ) ? UINT64_C(0xFFFFFFFF00000000) : ( a0 / b0 )<<32;
|
||||
mul64To128( b, z, &term0, &term1 );
|
||||
sub128( a0, a1, term0, term1, &rem0, &rem1 );
|
||||
while ( ( (int64_t) rem0 ) < 0 ) {
|
||||
z -= LIT64( 0x100000000 );
|
||||
z -= UINT64_C(0x100000000);
|
||||
b1 = b<<32;
|
||||
add128( rem0, rem1, b0, b1, &rem0, &rem1 );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue