2000-05-28 13:40:48 +00:00
|
|
|
/*****************************************************************************/
|
|
|
|
/* */
|
2013-05-09 11:56:54 +00:00
|
|
|
/* stdfunc.h */
|
2000-05-28 13:40:48 +00:00
|
|
|
/* */
|
2013-05-09 11:56:54 +00:00
|
|
|
/* Handle inlining of known functions for the cc65 compiler */
|
2000-05-28 13:40:48 +00:00
|
|
|
/* */
|
|
|
|
/* */
|
|
|
|
/* */
|
2004-06-02 21:33:35 +00:00
|
|
|
/* (C) 1998-2004 Ullrich von Bassewitz */
|
2014-06-30 09:10:35 +00:00
|
|
|
/* Roemerstrasse 52 */
|
2004-06-02 21:33:35 +00:00
|
|
|
/* D-70794 Filderstadt */
|
|
|
|
/* EMail: uz@cc65.org */
|
2000-05-28 13:40:48 +00:00
|
|
|
/* */
|
|
|
|
/* */
|
|
|
|
/* This software is provided 'as-is', without any expressed or implied */
|
|
|
|
/* warranty. In no event will the authors be held liable for any damages */
|
|
|
|
/* arising from the use of this software. */
|
|
|
|
/* */
|
|
|
|
/* Permission is granted to anyone to use this software for any purpose, */
|
|
|
|
/* including commercial applications, and to alter it and redistribute it */
|
|
|
|
/* freely, subject to the following restrictions: */
|
|
|
|
/* */
|
|
|
|
/* 1. The origin of this software must not be misrepresented; you must not */
|
|
|
|
/* claim that you wrote the original software. If you use this software */
|
|
|
|
/* in a product, an acknowledgment in the product documentation would be */
|
|
|
|
/* appreciated but is not required. */
|
|
|
|
/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
|
|
/* be misrepresented as being the original software. */
|
|
|
|
/* 3. This notice may not be removed or altered from any source */
|
|
|
|
/* distribution. */
|
|
|
|
/* */
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef STDFUNC_H
|
|
|
|
#define STDFUNC_H
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-07-16 11:01:51 +00:00
|
|
|
/* cc65 */
|
2000-05-28 13:40:48 +00:00
|
|
|
#include "expr.h"
|
2002-07-16 11:01:51 +00:00
|
|
|
#include "symtab.h"
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
2013-05-09 11:56:54 +00:00
|
|
|
/* Code */
|
2000-05-28 13:40:48 +00:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-24 19:52:12 +00:00
|
|
|
void AddCmpCodeIfSizeNot256 (const char* Code, long Size);
|
|
|
|
/* Add a line of Assembly code that compares an index register
|
|
|
|
** only if it isn't comparing to #<256. (If the next line
|
|
|
|
** is "bne", then this will avoid a redundant line.)
|
|
|
|
*/
|
|
|
|
|
2004-06-02 21:33:35 +00:00
|
|
|
int FindStdFunc (const char* Name);
|
2000-05-28 13:40:48 +00:00
|
|
|
/* Determine if the given function is a known standard function that may be
|
2014-06-30 09:10:35 +00:00
|
|
|
** called in a special way. If so, return the index, otherwise return -1.
|
|
|
|
*/
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2004-06-02 21:33:35 +00:00
|
|
|
void HandleStdFunc (int Index, struct FuncDesc* F, ExprDesc* lval);
|
2000-05-28 13:40:48 +00:00
|
|
|
/* Generate code for a known standard function. */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* End of stdfunc.h */
|
|
|
|
#endif
|