get rid of ugly do/while(0) construction

This commit is contained in:
Stanislav Shwartsman 2007-09-14 19:39:11 +00:00
parent 5a2ce284c3
commit efbcc99e9a

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: status_w.h,v 1.10 2007-03-23 21:27:13 sshwarts Exp $
// $Id: status_w.h,v 1.11 2007-09-14 19:39:11 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2003 Stanislav Shwartsman
@ -60,14 +60,8 @@
#define FPU_EX_Precision_Lost_Up (EX_Precision | SW_C1)
#define FPU_EX_Precision_Lost_Dn (EX_Precision)
/*
* bbd: use do {...} while (0) structure instead of using curly brackets
* inside parens, which most compilers do not like.
*/
#define setcc(cc) do { \
FPU_PARTIAL_STATUS &= ~(FPU_SW_CC); \
FPU_PARTIAL_STATUS |= (cc) & FPU_SW_CC; \
} while(0);
#define setcc(cc) \
FPU_PARTIAL_STATUS = (FPU_PARTIAL_STATUS & ~(FPU_SW_CC)) | ((cc) & FPU_SW_CC)
#define clear_C1() { FPU_PARTIAL_STATUS &= ~FPU_SW_C1; }
#define clear_C2() { FPU_PARTIAL_STATUS &= ~FPU_SW_C2; }