CVS: msp430-libc/include iomacros.h,1.27,1.28 signal.h,1.13,1.14

Steve Underwood <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/msp430-libc/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11906/msp430-libc/include

Modified Files:
	iomacros.h signal.h 
Log Message:
Added definitions like those in the newer IAR and CCE tools, for compatibility


Index: iomacros.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/iomacros.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -w -d -r1.27 -r1.28
--- iomacros.h	28 Jan 2004 22:25:29 -0000	1.27
+++ iomacros.h	22 Feb 2005 16:29:46 -0000	1.28
@@ -26,7 +26,6 @@
  * $Id$
  */
 
-
 #ifndef _IOMACROS_H_
 #define _IOMACROS_H_
 
@@ -119,6 +118,9 @@
 #define _BIS_SR(x) __asm__ __volatile__( "bis	%0, r2" : : "i" ((uint16_t)x) );
 #define _BIC_SR(x) __asm__ __volatile__( "bic	%0, r2" : : "i" ((uint16_t)x) );
 
+#define __bis_SR_register(x)    __asm__ __volatile__( "bis	%0, r2" : : "i" ((uint16_t)x) );
+#define __bic_SR_register(x)    __asm__ __volatile__( "bic	%0, r2" : : "i" ((uint16_t)x) );
+
 #if __GNUC_MINOR__ >= 4
 
 extern void __bis_sr_irq(int);
@@ -127,6 +129,10 @@
 
 #define _BIS_SR_IRQ(x) 	__bis_sr_irq(x)
 #define _BIC_SR_IRQ(x)	__bic_sr_irq(x)
+
+#define __bis_SR_register_on_exit(x)    __bis_sr_irq(x)
+#define __bic_SR_register_on_exit(x)    __bic_sr_irq(x)
+
 #define GET_FRAME_ADDR_F(x)	__get_frame_address()
 #define __EXIT_LPM(x) do {int *p = __get_frame_address(); *p = x;} while(0)
 
@@ -144,6 +150,18 @@
         : : "i" ((uint16_t)x)\
     )
 
+#define __bis_SR_register_on_exit(x)\
+    __asm__ __volatile__ (\
+        "bis %0, .L__FrameOffset_" __FUNCTION__ "(r1)"\
+        : : "i" ((uint16_t)x)\
+    )
+
+#define __bic_SR_register_on_exit(x)\
+    __asm__ __volatile__ (\
+        "bic %0, .L__FrameOffset_" __FUNCTION__ "(r1)"\
+        : : "i" ((uint16_t)x)\
+    )
+
 #define GET_FRAME_ADDR(name) 			\
 ({						\
 	uint16_t __x;				\
@@ -195,16 +213,17 @@
 sfrw_(x,x_)
 
 
-/***** USEFULL MACROS DEFENITIONS *********/
+/***** USEFUL MACROS DEFINITIONS *********/
 
 
-/* no operation */
+/* No operation */
 #define nop()	__asm__ __volatile__("nop"::)
 
-/* IAR compatibility functs */
+/* IAR compatibility functions */
 #define _NOP()	nop()
+#define __no_operation()    nop()
 
-/* set SFR with command. Usefull for bitwise operations  */
+/* Set SFR with command. Useful for bitwise operations  */
 #define SFR_CMD(cmd,s,v)		\
 ({					\
 typedef _ts = (s);			\
@@ -256,7 +275,6 @@
 })
 
 
-
 #define AND_LOW_V(v, i)	\
 ({				\
 	int __t;		\
@@ -285,15 +303,10 @@
 })
 
 
-
 #define MARK_VOLATILE	__asm__ __volatile__("; volatile")
 
-
 #endif /* not _GNU_ASSEMBLER_ */
 
-
-
-
 /*
  *  Defines for assembler.
  *  hope there is a better way to do this.
@@ -305,6 +318,4 @@
 
 #endif
 
-
-
 #endif /* _IOMACROS_H_ */

Index: signal.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/signal.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -w -d -r1.13 -r1.14
--- signal.h	7 Dec 2003 13:17:22 -0000	1.13
+++ signal.h	22 Feb 2005 16:29:46 -0000	1.14
@@ -48,15 +48,15 @@
 #define ENABLENESTED    __attribute__((signal))
 
 
-
 /* Enable/Disable interrupts */
 #define eint()  __asm__ __volatile__("eint"::)
 #define dint()  __asm__ __volatile__("dint"::)
 
-/* IAR compatibility functs */
+/* IAR compatibility functions */
 #define _EINT()	eint()
+#define __enable_interrupt()    eint()
 #define _DINT() dint()
-
+#define __disable_interrupt()   dint()
 
 
 #define INTERRUPT_VECTORS	\



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.