Skip to content

Commit

Permalink
Removed CC_FASTCALL.
Browse files Browse the repository at this point in the history
CC_FASTCALL was introduced many years ago for the cc65 tool chain. It was never used for another tool chain. With cc65/cc65@a798b1d the cc65 tool chain doesn't need CC_FASTCALL anymore.
  • Loading branch information
oliverschmidt committed Nov 1, 2015
1 parent 1066bb1 commit 1639b71
Show file tree
Hide file tree
Showing 20 changed files with 37 additions and 56 deletions.
2 changes: 1 addition & 1 deletion apps/cmdd/cmdd.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static char send_udp = 0;
static const char *prompt = "contiki> ";

/*---------------------------------------------------------------------------*/
static char * CC_FASTCALL
static char *
n(uint16_t num, char *ptr)
{
uint16_t d;
Expand Down
12 changes: 6 additions & 6 deletions apps/webbrowser/htmlparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static const char *tags[] = {
};

/*-----------------------------------------------------------------------------------*/
static unsigned char CC_FASTCALL
static unsigned char
iswhitespace(char c)
{
return (c == ISO_space ||
Expand Down Expand Up @@ -255,7 +255,7 @@ htmlparser_init(void)
#endif /* WWW_CONF_FORMS */
}
/*-----------------------------------------------------------------------------------*/
static char CC_FASTCALL
static char
lowercase(char c)
{
/* XXX: This is a *brute force* approach to lower-case
Expand All @@ -276,7 +276,7 @@ endtagfound(void)
s.tagattrparam[s.tagattrparamptr] = 0;
}
/*-----------------------------------------------------------------------------------*/
static void CC_FASTCALL
static void
switch_majorstate(unsigned char newstate)
{
if(s.majorstate != newstate) {
Expand All @@ -286,7 +286,7 @@ switch_majorstate(unsigned char newstate)
}
}
/*-----------------------------------------------------------------------------------*/
static void CC_FASTCALL
static void
add_char(unsigned char c)
{
if(s.wordlen < WWW_CONF_WEBPAGE_WIDTH - 1 && c < 0x80) {
Expand Down Expand Up @@ -320,7 +320,7 @@ newline(void)
htmlparser_newline();
}
/*-----------------------------------------------------------------------------------*/
static unsigned char CC_FASTCALL
static unsigned char
find_tag(char *tag)
{
static unsigned char first, last, i, tabi;
Expand Down Expand Up @@ -521,7 +521,7 @@ parse_tag(void)
}
}
/*-----------------------------------------------------------------------------------*/
static uint16_t CC_FASTCALL
static uint16_t
parse_word(char *data, uint8_t dlen)
{
static uint8_t i;
Expand Down
18 changes: 9 additions & 9 deletions apps/webbrowser/www.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ PROCESS(www_process, "Web browser");

AUTOSTART_PROCESSES(&www_process);

static void CC_FASTCALL formsubmit(struct inputattrib *trigger);
static void formsubmit(struct inputattrib *trigger);

/*-----------------------------------------------------------------------------------*/
/* make_window()
Expand Down Expand Up @@ -232,7 +232,7 @@ redraw_window(void)
ctk_window_redraw(&mainwindow);
}
/*-----------------------------------------------------------------------------------*/
static char * CC_FASTCALL
static char *
add_pageattrib(unsigned size)
{
char *ptr;
Expand All @@ -246,7 +246,7 @@ add_pageattrib(unsigned size)
}
/*-----------------------------------------------------------------------------------*/
#if WWW_CONF_FORMS
static void CC_FASTCALL
static void
add_forminput(struct inputattrib *inputptr)
{
inputptr->nextptr = NULL;
Expand Down Expand Up @@ -285,7 +285,7 @@ start_loading(void)
clear_page();
}
/*-----------------------------------------------------------------------------------*/
static void CC_FASTCALL
static void
show_statustext(char *text)
{
ctk_label_set_text(&statustext, text);
Expand Down Expand Up @@ -398,7 +398,7 @@ open_url(void)
* Will format a link from the current web pages so that it suits the
* open_url() function.
*/
static void CC_FASTCALL
static void
set_link(char *link)
{
register char *urlptr;
Expand Down Expand Up @@ -618,7 +618,7 @@ PROCESS_THREAD(www_process, ev, data)
* "url" variable and the visible "editurl" (which is shown in the URL
* text entry widget in the browser window).
*/
static void CC_FASTCALL
static void
set_url(char *host, uint16_t port, char *file)
{
char *urlptr;
Expand Down Expand Up @@ -732,7 +732,7 @@ webclient_datahandler(char *data, uint16_t len)
}
}
/*-----------------------------------------------------------------------------------*/
static void CC_FASTCALL
static void
add_pagewidget(char *text, unsigned char size, char *attrib, unsigned char type,
unsigned char border)
{
Expand Down Expand Up @@ -939,7 +939,7 @@ htmlparser_inputfield(unsigned char type, unsigned char size, char *text, char *
}
}
/*-----------------------------------------------------------------------------------*/
static void CC_FASTCALL
static void
add_query(char delimiter, char *string)
{
static char *query;
Expand Down Expand Up @@ -967,7 +967,7 @@ add_query(char delimiter, char *string)
query += length;
}
/*-----------------------------------------------------------------------------------*/
static void CC_FASTCALL
static void
formsubmit(struct inputattrib *trigger)
{
struct inputattrib *input;
Expand Down
16 changes: 8 additions & 8 deletions core/ctk/ctk.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ unsigned short ctk_screensaver_timeout = (5*60);
static struct timer timer;
#endif /* CTK_CONF_SCREENSAVER */

static void CC_FASTCALL
static void
textentry_input(ctk_arch_key_t c,
CC_REGISTER_ARG struct ctk_textentry *t);

Expand Down Expand Up @@ -555,7 +555,7 @@ ctk_menu_remove(struct ctk_menu *menu)
* \param clipy2 The lower bound of the clip interval
*/
/*---------------------------------------------------------------------------*/
static void CC_FASTCALL
static void
do_redraw_all(unsigned char clipy1, unsigned char clipy2)
{
#if CTK_CONF_WINDOWS
Expand Down Expand Up @@ -818,7 +818,7 @@ ctk_menuitem_add(CC_REGISTER_ARG struct ctk_menu *menu, char *name)
* \param w The widget that should be redrawn.
*/
/*---------------------------------------------------------------------------*/
static void CC_FASTCALL
static void
add_redrawwidget(struct ctk_widget *w)
{
static unsigned char i;
Expand Down Expand Up @@ -921,7 +921,7 @@ ctk_widget_redraw(struct ctk_widget *widget)
* \param widget The widget to be added.
*/
/*---------------------------------------------------------------------------*/
void CC_FASTCALL
void
ctk_widget_add(CC_REGISTER_ARG struct ctk_window *window,
CC_REGISTER_ARG struct ctk_widget *widget)
{
Expand Down Expand Up @@ -973,7 +973,7 @@ ctk_desktop_height(struct ctk_desktop *d)
* \param focus The widget to be focused.
*/
/*---------------------------------------------------------------------------*/
static void CC_FASTCALL
static void
select_widget(struct ctk_widget *focus)
{
struct ctk_window *window;
Expand Down Expand Up @@ -1001,7 +1001,7 @@ select_widget(struct ctk_widget *focus)
#define DOWN 1
#define LEFT 2
#define RIGHT 3
static void CC_FASTCALL
static void
switch_focus_widget(unsigned char direction)
{
#if CTK_CONF_WINDOWS
Expand Down Expand Up @@ -1126,7 +1126,7 @@ switch_menu_item(unsigned char updown)
}
#endif /* CTK_CONF_MENUS */
/*---------------------------------------------------------------------------*/
static unsigned char CC_FASTCALL
static unsigned char
activate(CC_REGISTER_ARG struct ctk_widget *w)
{
if(w->type == CTK_WIDGET_BUTTON) {
Expand Down Expand Up @@ -1183,7 +1183,7 @@ ctk_textentry_input_null(ctk_arch_key_t c, struct ctk_textentry *t)
}
#endif /* SDCC */
/*---------------------------------------------------------------------------*/
static void CC_FASTCALL
static void
textentry_input(ctk_arch_key_t c, CC_REGISTER_ARG struct ctk_textentry *t)
{
register char *cptr, *cptr2;
Expand Down
4 changes: 2 additions & 2 deletions core/ctk/ctk.h
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,8 @@ void ctk_icon_add(struct ctk_widget *icon, struct process *p);
*/
#define CTK_WIDGET_ADD(win, widg) \
ctk_widget_add(win, (struct ctk_widget *)widg)
CCIF void CC_FASTCALL ctk_widget_add(struct ctk_window *window,
struct ctk_widget *widget);
CCIF void ctk_widget_add(struct ctk_window *window,
struct ctk_widget *widget);

/**
* Set focus to a widget.
Expand Down
14 changes: 2 additions & 12 deletions core/sys/cc.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,14 @@
#define CC_FUNCTION_POINTER_ARGS 0
#endif /* CC_CONF_FUNCTION_POINTER_ARGS */

/**
* Configure if the C compiler supports fastcall function
* declarations.
*/
#ifdef CC_CONF_FASTCALL
#define CC_FASTCALL CC_CONF_FASTCALL
#else /* CC_CONF_FASTCALL */
#define CC_FASTCALL
#endif /* CC_CONF_FASTCALL */

/**
* Configure if the C compiler have problems with const function pointers
*/
#ifdef CC_CONF_CONST_FUNCTION_BUG
#define CC_CONST_FUNCTION
#else /* CC_CONF_FASTCALL */
#else /* CC_CONF_CONST_FUNCTION_BUG */
#define CC_CONST_FUNCTION const
#endif /* CC_CONF_FASTCALL */
#endif /* CC_CONF_CONST_FUNCTION_BUG */

/**
* Configure work-around for unsigned char bugs with sdcc.
Expand Down
1 change: 0 additions & 1 deletion cpu/6502/6502def.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ typedef uint32_t u32_t;
typedef int32_t s32_t;

#define CC_CONF_REGISTER_ARGS 1
#define CC_CONF_FASTCALL __fastcall__

#define ARCH_DOESNT_NEED_ALIGNED_STRUCTS 1

Expand Down
4 changes: 2 additions & 2 deletions cpu/6502/lib/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

/*-----------------------------------------------------------------------------------*/
#if LOG_CONF_ENABLED
static char * CC_FASTCALL
static char *
ipaddrtoa(uip_ipaddr_t *ipaddr, char *buffer)
{
char *ptr = buffer;
Expand All @@ -59,7 +59,7 @@ ipaddrtoa(uip_ipaddr_t *ipaddr, char *buffer)
}
#endif /* LOG_CONF_ENABLED */
/*-----------------------------------------------------------------------------------*/
struct ethernet_config * CC_FASTCALL
struct ethernet_config *
config_read(char *filename)
{
static struct {
Expand Down
2 changes: 1 addition & 1 deletion cpu/6502/lib/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
#ifndef CONFIG_H_
#define CONFIG_H_

struct ethernet_config * CC_FASTCALL config_read(char *filename);
struct ethernet_config * config_read(char *filename);

#endif /* CONFIG_H_ */
2 changes: 1 addition & 1 deletion cpu/6502/net/ethernet.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct {
} *module;

/*---------------------------------------------------------------------------*/
void CC_FASTCALL
void
ethernet_init(struct ethernet_config *config)
{
static const char signature[4] = {0x65, 0x74, 0x68, 0x01};
Expand Down
2 changes: 1 addition & 1 deletion cpu/6502/net/ethernet.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef ETHERNET_H_
#define ETHERNET_H_

void CC_FASTCALL ethernet_init(struct ethernet_config *config);
void ethernet_init(struct ethernet_config *config);
uint16_t ethernet_poll(void);
void ethernet_send(void);
void ethernet_exit(void);
Expand Down
1 change: 0 additions & 1 deletion cpu/cc2430/8051def.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#endif

#define CC_CONF_FUNCTION_POINTER_ARGS 1
#define CC_CONF_FASTCALL
#define CC_CONF_VA_ARGS 1
#define CC_CONF_UNSIGNED_CHAR_BUGS 0
#define CC_CONF_REGISTER_ARGS 0
Expand Down
1 change: 0 additions & 1 deletion cpu/cc253x/8051def.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#endif

#define CC_CONF_FUNCTION_POINTER_ARGS 1
#define CC_CONF_FASTCALL
#define CC_CONF_VA_ARGS 1
#define CC_CONF_UNSIGNED_CHAR_BUGS 0
#define CC_CONF_REGISTER_ARGS 0
Expand Down
1 change: 0 additions & 1 deletion platform/cooja/contiki-conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@

#define CC_CONF_REGISTER_ARGS 1
#define CC_CONF_FUNCTION_POINTER_ARGS 1
#define CC_CONF_FASTCALL
#define CC_CONF_VA_ARGS 1
#define CC_CONF_INLINE inline

Expand Down
1 change: 0 additions & 1 deletion platform/jn516x/platform-conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@

#define CC_CONF_REGISTER_ARGS 1
#define CC_CONF_FUNCTION_POINTER_ARGS 1
#define CC_CONF_FASTCALL
#define CC_CONF_VA_ARGS 1
#define CC_CONF_INLINE inline

Expand Down
1 change: 0 additions & 1 deletion platform/mbxxx/platform-conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
/* Platform-dependent definitions */
#define CC_CONF_REGISTER_ARGS 0
#define CC_CONF_FUNCTION_POINTER_ARGS 1
#define CC_CONF_FASTCALL
#define CC_CONF_VA_ARGS 1
#define CC_CONF_INLINE inline

Expand Down
1 change: 0 additions & 1 deletion platform/minimal-net/contiki-conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ int select_set_callback(int fd, const struct select_callback *callback);

#define CC_CONF_REGISTER_ARGS 1
#define CC_CONF_FUNCTION_POINTER_ARGS 1
#define CC_CONF_FASTCALL
#define CC_CONF_VA_ARGS 1

#define CCIF
Expand Down
1 change: 0 additions & 1 deletion platform/native/contiki-conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ int select_set_callback(int fd, const struct select_callback *callback);

#define CC_CONF_REGISTER_ARGS 1
#define CC_CONF_FUNCTION_POINTER_ARGS 1
#define CC_CONF_FASTCALL
#define CC_CONF_VA_ARGS 1
/*#define CC_CONF_INLINE inline*/

Expand Down
3 changes: 1 addition & 2 deletions platform/win32/contiki-conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
#endif

#define CC_CONF_REGISTER_ARGS 1
#define CC_CONF_FASTCALL __fastcall
#define CC_CONF_INLINE __inline
#define CC_CONF_INLINE __inline

#define ARCH_DOESNT_NEED_ALIGNED_STRUCTS 1

Expand Down
6 changes: 3 additions & 3 deletions tools/wpcapslip/tcpdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ tcpflags(unsigned char flags, char *flagsstr)
*flagsstr = 0;
}
/*---------------------------------------------------------------------------*/
static char * CC_FASTCALL
static char *
n(uint16_t num, char *ptr)
{
uint16_t d;
Expand All @@ -179,14 +179,14 @@ n(uint16_t num, char *ptr)
return ptr;
}
/*---------------------------------------------------------------------------*/
static char * CC_FASTCALL
static char *
d(char *ptr)
{
*ptr = '.';
return ptr + 1;
}
/*---------------------------------------------------------------------------*/
static char * CC_FASTCALL
static char *
s(char *str, char *ptr)
{
strcpy(ptr, str);
Expand Down

0 comments on commit 1639b71

Please sign in to comment.