This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Commit: MSP430: Pass -md on to assembler

Hi Guys,

  I am applying the patch below to add a couple of minor tweaks to the
  msp430.h header file.  The first is to pass the -md command line
  option to the assembler, to enable the copying of data from ROM to
  RAM.  (This is a code size optimization.  The assembler and linker
  conspire to detect when the .data section is empty and, if it is, the
  code to perform the copying is omitted from crt0.o.  The -md command
  line option enables this feature).

  The other tweak is to define ASM_DECLARE_FUNCTION_NAME so that
  msp430_start_function can provide some annotations describing the
  function in the assembler output.  This is mainly for debugging


2013-09-18  Nick Clifton  <>

	* config/msp430/msp430.h (ASM_SPEC): Pass -md on to the assembler.

Index: gcc/config/msp430/msp430.h
--- gcc/config/msp430/msp430.h	(revision 202680)
+++ gcc/config/msp430/msp430.h	(working copy)
@@ -54,6 +54,7 @@
   "%{mmcu=msp430x:-mmcu=msp430X;mmcu=*:-mmcu=%*} " /* Pass the MCU type on to the assembler.  */  \
   "%{mrelax=-mQ} " /* Pass the relax option on to the assembler.  */ \
   "%{mlarge:-ml} " /* Tell the assembler if we are building for the LARGE pointer model.  */ \
+  "%{!msim:-md} %{msim:%{mlarge:-md}}" /* Copy data from ROM to RAM if necessary.  */ \
   "%{ffunction-sections:-gdwarf-sections}" /* If function sections are being created then create DWARF line number sections as well.  */
 /* Enable linker section garbage collection by default, unless we
@@ -399,3 +400,7 @@
+  msp430_start_function ((FILE), (NAME), (DECL))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]