Changeset 674


Ignore:
Timestamp:
Sep 9, 2003, 6:38:32 PM (22 years ago)
Author:
zap
Message:

.

Location:
trunk/src/gcc/gcc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/gcc/gcc/config/i386/emx.c

    • Property cvs2svn:cvs-rev changed from 1.23 to 1.24
    r673 r674  
    3131#include "flags.h"
    3232#include "i386-protos.h"
    33 #include "diagnostic.h"
    3433
    3534/* The size of the target's pointer type.  */
     
    422421  }
    423422}
    424 
    425 /* Adds calling convention to a function dump. (diagnostic) */
    426 void emx_print_callingconvention (tree type, struct output_buffer *scratch_buffer)
    427 {
    428   const char *conv = NULL;
    429 
    430   if (lookup_attribute ("system", TYPE_ATTRIBUTES (type)))
    431     conv = "_System ";
    432   else if (lookup_attribute ("optlink", TYPE_ATTRIBUTES (type)))
    433     conv = "_Optlink ";
    434   else if (lookup_attribute ("stdcall", TYPE_ATTRIBUTES (type)))
    435     conv = "__stdcall ";
    436   else if (lookup_attribute ("cdecl", TYPE_ATTRIBUTES (type)))
    437     conv = "__cdecl ";
    438 
    439   if (conv)
    440     output_add_string(scratch_buffer, conv);
    441 
    442 }
    443 
  • TabularUnified trunk/src/gcc/gcc/config/i386/emx.h

    • Property cvs2svn:cvs-rev changed from 1.19 to 1.20
    r673 r674  
    108108#define TARGET_CXX_SET_DECL_ASSEMBLER_NAME(decl) \
    109109  (emx_c_set_decl_assembler_name (decl, DECL_LANG_SPECIFIC(decl) && DECL_FUNCTION_MEMBER_P (decl)))
    110 
    111 /* pretty warnings and errors in C++ */
    112 struct output_buffer;
    113 extern void emx_print_callingconvention PARAMS ((tree type, struct output_buffer *scratch_buffer));
    114110
    115111/* This macros will stick a label to exception table for current file,
  • TabularUnified trunk/src/gcc/gcc/config/i386/i386-protos.h

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r673 r674  
    200200extern int x86_field_alignment PARAMS ((tree, int));
    201201#endif
     202
     203#ifdef GCC_DIAGNOSTIC_H
     204#define TARGET_PRINT_TYPE_ATTRS(t, scratch_buffer) \
     205  ix86_print_attributes (t, scratch_buffer)
     206extern void ix86_print_attributes PARAMS ((tree type, struct output_buffer *scratch_buffer));
     207#endif
  • TabularUnified trunk/src/gcc/gcc/config/i386/i386.c

    • Property cvs2svn:cvs-rev changed from 1.13 to 1.14
    r673 r674  
    4141#include "basic-block.h"
    4242#include "ggc.h"
     43#include "diagnostic.h"
    4344#include "target.h"
    4445#include "target-def.h"
     
    14651466
    14661467  return NULL_TREE;
     1468}
     1469
     1470/* Adds calling convention to a function dump. (diagnostic) */
     1471void ix86_print_attributes (tree type, struct output_buffer *scratch_buffer)
     1472{
     1473  tree attr;
     1474
     1475  if (lookup_attribute ("cdecl", TYPE_ATTRIBUTES (type)))
     1476    output_add_string(scratch_buffer, "__attribute__((cdecl)) ");
     1477  if (lookup_attribute ("stdcall", TYPE_ATTRIBUTES (type)))
     1478    output_add_string(scratch_buffer, "__attribute__((stdcall)) ");
     1479  if ((attr = lookup_attribute ("regparm", TYPE_ATTRIBUTES (type))))
     1480  {
     1481    char temp [32];
     1482    int nregs = TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (attr)));
     1483    sprintf (temp, "__attribute__((regparm(%d))) ", nregs);
     1484    output_add_string(scratch_buffer, temp);
     1485  }
     1486#ifdef TARGET_SYSTEM_DECL_ATTRIBUTES
     1487  if (lookup_attribute ("system", TYPE_ATTRIBUTES (type)))
     1488    output_add_string(scratch_buffer, "__attribute__((system)) ");
     1489#endif
     1490#ifdef TARGET_OPTLINK_DECL_ATTRIBUTES
     1491  if (lookup_attribute ("optlink", TYPE_ATTRIBUTES (type)))
     1492    output_add_string(scratch_buffer, "__attribute__((optlink)) ");
     1493#endif
    14671494}
    14681495
  • TabularUnified trunk/src/gcc/gcc/cp/error.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r673 r674  
    2929#include "flags.h"
    3030#include "diagnostic.h"
     31#include "tm_p.h"
    3132
    3233enum pad { none, before, after };
     
    658659        output_add_space (scratch_buffer);
    659660      print_left_paren (scratch_buffer);
    660 #ifdef EMX
    661       emx_print_callingconvention(t, scratch_buffer);
     661#ifdef TARGET_PRINT_TYPE_ATTRS
     662      TARGET_PRINT_TYPE_ATTRS (t, scratch_buffer);
    662663#endif
    663664      padding = none;
     
    669670        output_add_space (scratch_buffer);
    670671      print_left_paren (scratch_buffer);
    671 #ifdef EMX
    672       emx_print_callingconvention(t, scratch_buffer);
     672#ifdef TARGET_PRINT_TYPE_ATTRS
     673      TARGET_PRINT_TYPE_ATTRS (t, scratch_buffer);
    673674#endif
    674675      padding = none;
Note: See TracChangeset for help on using the changeset viewer.