Browse Source

Fix sparc64 build with -DNO_ASM and reduce compiler warnings.

master
Richard Kreckel 17 years ago
parent
commit
d7dbc185bc
  1. 5
      ChangeLog
  2. 2
      include/cln/floatformat.h
  3. 9
      src/base/cl_low.h

5
ChangeLog

@ -1,3 +1,8 @@
2008-04-21 Richard B. Kreckel <kreckel@ginac.de>
* src/base/cl_low.h: Fix sparc64 build with -DNO_ASM.
* include/cln/floatformat.h: Avoid compiler warning.
2008-04-18 Bruno Haible <bruno@clisp.org> 2008-04-18 Bruno Haible <bruno@clisp.org>
* src/integer/cl_I.h (FN_MSD1_mask, FN_MSD2_mask, FN_MSD3_mask): * src/integer/cl_I.h (FN_MSD1_mask, FN_MSD2_mask, FN_MSD3_mask):

2
include/cln/floatformat.h

@ -13,7 +13,7 @@ enum float_format_t {
float_format_ffloat = 24, float_format_ffloat = 24,
float_format_dfloat = 53, float_format_dfloat = 53,
float_format_lfloat_min = ((53+intDsize-1)/intDsize)*intDsize, // = round_up(53,intDsize) float_format_lfloat_min = ((53+intDsize-1)/intDsize)*intDsize, // = round_up(53,intDsize)
float_format_lfloat_max = ~((sintE)(1) << intEsize-1) // force correct underlying type of float_format_t
float_format_lfloat_max = ~((sintE)(1) << (intEsize-1)) // force correct underlying type of float_format_t
}; };
} // namespace cln } // namespace cln

9
src/base/cl_low.h

@ -144,7 +144,7 @@ inline uint32 mulu16 (uint16 arg1, uint16 arg2)
); );
return highlow32(_hi,_lo); return highlow32(_hi,_lo);
} }
#elif defined(__sparc__) || defined(__sparc64__)
#elif (defined(__sparc__) || defined(__sparc64__)) && !defined(NO_ASM)
extern "C" uint32 mulu16_ (uint16 arg1, uint16 arg2); extern "C" uint32 mulu16_ (uint16 arg1, uint16 arg2);
#define mulu16 mulu16_ // extern in Assembler #define mulu16 mulu16_ // extern in Assembler
#else #else
@ -384,14 +384,10 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2)
#else #else
#define mulu64(x,y,hi_zuweisung,lo_zuweisung) \ #define mulu64(x,y,hi_zuweisung,lo_zuweisung) \
{ lo_zuweisung mulu64_(x,y); hi_zuweisung mulu64_high; } { lo_zuweisung mulu64_(x,y); hi_zuweisung mulu64_high; }
#if defined(__sparc64__)
#if defined(__sparc64__) && !defined(NO_ASM)
// mulu64_ extern in Assembler // mulu64_ extern in Assembler
#if defined(__sparc64__)
extern "C" uint64 _get_g2 (void); extern "C" uint64 _get_g2 (void);
#define mulu64_high (_get_g2()) // Rückgabe im Register %g2 #define mulu64_high (_get_g2()) // Rückgabe im Register %g2
#else
#define NEED_VAR_mulu64_high
#endif
#else #else
#define NEED_FUNCTION_mulu64_ #define NEED_FUNCTION_mulu64_
#endif #endif
@ -585,6 +581,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2)
q_zuweisung (uint32)__q; \ q_zuweisung (uint32)__q; \
r_zuweisung (uint32)__r; \ r_zuweisung (uint32)__r; \
}) })
#define divu_3232_3232_(x,y) divu_6432_3232_(0,x,y)
#elif defined(__sparc__) || defined(__sparc64__) || defined(__i386__) || defined(__x86_64__) #elif defined(__sparc__) || defined(__sparc64__) || defined(__i386__) || defined(__x86_64__)
#define divu_3232_3232(x,y,q_zuweisung,r_zuweisung) \ #define divu_3232_3232(x,y,q_zuweisung,r_zuweisung) \
divu_6432_3232(0,x,y,q_zuweisung,r_zuweisung) divu_6432_3232(0,x,y,q_zuweisung,r_zuweisung)

Loading…
Cancel
Save