From 6f6ddc0011d08044cd91d1d8222fe1c6fae5d900 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 29 Jun 2000 22:33:05 +0000 Subject: Added RTEMS_CPU_HAS_16_BIT_ADDRESSES constant to disable code that breaks when the target has 16 bit address space. One of the H8 multilibs is a 16-bit address space CPU. When a real attempt is made to support this CPU model, the code that assumes an address is 32 bits will have to change. This constant is probably not flagging all impacted code. --- cpukit/score/inline/rtems/score/address.inl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpukit/score') diff --git a/cpukit/score/inline/rtems/score/address.inl b/cpukit/score/inline/rtems/score/address.inl index 1a77e617d7..b9a0373aff 100644 --- a/cpukit/score/inline/rtems/score/address.inl +++ b/cpukit/score/inline/rtems/score/address.inl @@ -90,7 +90,11 @@ RTEMS_INLINE_ROUTINE boolean _Addresses_Is_aligned ( void *address ) { +#if defined(RTEMS_CPU_HAS_16_BIT_ADDRESSES) + return ( ( (unsigned short)address % CPU_ALIGNMENT ) == 0 ); +#else return ( ( (unsigned32)address % CPU_ALIGNMENT ) == 0 ); +#endif } /*PAGE -- cgit v1.2.3