visibility savings, as basically everything defined it.
svn path=/trunk/yasm/; revision=1893
* POSSIBILITY OF SUCH DAMAGE.
* \endlicense
*
- * Define YASM_LIB_INTERNAL to include many internal function and variable
- * definitions that violate the yasm_* namespace. This includes
- * compat-queue.h, bitvect.h, and hamt.h.
- *
* Additional parts may be included via:
* - YASM_BC_INTERNAL: reveal bytecode internal structures via bc-int.h
* inclusion
#include <libyasm-stdint.h>
#endif
-#ifdef YASM_LIB_INTERNAL
-# include <libyasm/compat-queue.h>
-#endif
+#include <libyasm/compat-queue.h>
#include <libyasm/coretype.h>
#include <libyasm/valparam.h>
#include <libyasm/file.h>
#include <libyasm/module.h>
-#ifdef YASM_LIB_INTERNAL
#ifdef YASM_BC_INTERNAL
#include <libyasm/bc-int.h>
#endif
#include <libyasm/expr-int.h>
#endif
#include <libyasm/hamt.h>
-#include <libyasm/bitvect.h>
#include <libyasm/md5.h>
-#endif
#endif
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
}
}
}
-
-/* Non-macro yasm_dvs_initialize() for non-YASM_LIB_INTERNAL users. */
-#undef yasm_dvs_initialize
-void
-yasm_dvs_initialize(yasm_datavalhead *headp)
-{
- STAILQ_INIT(headp);
-}
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#include "util.h"
RCSID("$Id$");
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
/** A list of data values (opaque type). */
typedef struct yasm_datavalhead yasm_datavalhead;
-#ifdef YASM_LIB_INTERNAL
/*@reldef@*/ STAILQ_HEAD(yasm_datavalhead, yasm_dataval);
-#endif
/** Set multiple field of a bytecode.
* A bytecode can be repeated a number of times when output. This function
/*@dependent@*/ /*@null@*/ yasm_section *yasm_bc_get_section
(yasm_bytecode *bc);
-#ifdef YASM_LIB_INTERNAL
/** Add to the list of symrecs that reference a bytecode. For symrec use
* only.
* \param bc bytecode
* \param sym symbol
*/
void yasm_bc__add_symrec(yasm_bytecode *bc, /*@dependent@*/ yasm_symrec *sym);
-#endif
-
+
/** Delete (free allocated memory for) a bytecode.
* \param bc bytecode (only pointer to it); may be NULL
*/
* \param headp list of data values
*/
void yasm_dvs_initialize(yasm_datavalhead *headp);
-#ifdef YASM_LIB_INTERNAL
#define yasm_dvs_initialize(headp) STAILQ_INIT(headp)
-#endif
/** Delete (free allocated memory for) a list of data values.
* \param headp list of data values
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
}
}
}
-
-/* Non-macro yasm_insn_ops_first() for non-YASM_LIB_INTERNAL users. */
-#undef yasm_insn_ops_first
-yasm_insn_operand *
-yasm_insn_ops_first(yasm_insn *insn)
-{
- return STAILQ_FIRST(&insn->operands);
-}
-
-/* Non-macro yasm_insn_op_next() for non-YASM_LIB_INTERNAL users. */
-#undef yasm_insn_op_next
-yasm_insn_operand *
-yasm_insn_op_next(yasm_insn_operand *cur)
-{
- return STAILQ_NEXT(cur, link);
-}
/** An instruction operand (opaque type). */
typedef struct yasm_insn_operand yasm_insn_operand;
-#ifdef YASM_LIB_INTERNAL
/** An instruction operand. */
struct yasm_insn_operand {
/** Link for building linked list of operands. \internal */
unsigned int num_prefixes; /**< Number of prefixes. */
unsigned int num_segregs; /**< Number of segment prefixes. */
};
-#endif
/** Set segment override for an effective address.
* Some architectures (such as x86) support segment overrides on effective
* \return First operand (NULL if no operands).
*/
yasm_insn_operand *yasm_insn_ops_first(yasm_insn *insn);
+#define yasm_insn_ops_first(insn) STAILQ_FIRST(&((insn)->operands))
/** Get the next operand in an instruction.
* \param op previous operand
* \return Next operand (NULL if op was the last operand).
*/
yasm_insn_operand *yasm_insn_op_next(yasm_insn_operand *op);
-
-#if defined(YASM_LIB_INTERNAL) && !defined(YASM_DOXYGEN)
-#define yasm_insn_ops_first(insn) STAILQ_FIRST(&(insn)->operands)
#define yasm_insn_op_next(cur) STAILQ_NEXT(cur, link)
-#endif
/** Add operand to the end of an instruction.
* \note Does not make a copy of the operand; so don't pass this function
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
/* Modified for use with yasm by Peter Johnson. */
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
*/
typedef struct yasm_reloc yasm_reloc;
-#ifdef YASM_LIB_INTERNAL
struct yasm_reloc {
/*@reldef@*/ STAILQ_ENTRY(yasm_reloc) link;
yasm_intnum *addr; /**< Offset (address) within section */
/*@dependent@*/ yasm_symrec *sym; /**< Relocated symbol */
};
-#endif
/** An object. This is the internal representation of an object file. */
struct yasm_object {
*/
/*@dependent@*/ /*@null@*/ yasm_section *cur_section;
-#ifdef YASM_LIB_INTERNAL
/** Linked list of sections. */
/*@reldef@*/ STAILQ_HEAD(yasm_sectionhead, yasm_section) sections;
* second level is directive name.
*/
/*@owned@*/ struct HAMT *directives;
-#endif
};
/** Create a new object. A default section is created as the first section.
* \return Next relocation for section. NULL if no more relocations.
*/
/*@null@*/ yasm_reloc *yasm_section_reloc_next(yasm_reloc *reloc);
-
-#ifdef YASM_LIB_INTERNAL
#define yasm_section_reloc_next(x) STAILQ_NEXT((x), link)
-#endif
/** Get the basic relocation information for a relocation.
* \param reloc relocation
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#define NO_STRING_INLINES
#include "util.h"
/*@unused@*/ RCSID("$Id$");
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
yasm_xfree(headp);
}
-/* Non-macro yasm_vps_append() for non-YASM_LIB_INTERNAL users. */
-#undef yasm_vps_append
-void
-yasm_vps_append(yasm_valparamhead *headp, /*@keep@*/ yasm_valparam *vp)
-{
- if (vp)
- STAILQ_INSERT_TAIL(headp, vp, link);
-}
-
-/* Non-macro yasm_vps_first() for non-YASM_LIB_INTERNAL users. */
-#undef yasm_vps_first
-/*@null@*/ /*@dependent@*/ yasm_valparam *
-yasm_vps_first(yasm_valparamhead *headp)
-{
- return STAILQ_FIRST(headp);
-}
-
-/* Non-macro yasm_vps_next() for non-YASM_LIB_INTERNAL users. */
-#undef yasm_vps_next
-/*@null@*/ /*@dependent@*/ yasm_valparam *
-yasm_vps_next(yasm_valparam *cur)
-{
- return STAILQ_NEXT(cur, link);
-}
-
int
yasm_dir_helper(void *obj, yasm_valparam *vp_first, unsigned long line,
const yasm_dir_help *help, size_t nhelp, void *data,
#ifndef YASM_VALPARAM_H
#define YASM_VALPARAM_H
-#ifdef YASM_LIB_INTERNAL
/** Value/parameter pair. \internal */
struct yasm_valparam {
/*@reldef@*/ STAILQ_ENTRY(yasm_valparam) link; /**< Next pair in list */
/** Linked list of value/parameter pairs. \internal */
/*@reldef@*/ STAILQ_HEAD(yasm_valparamhead, yasm_valparam);
-#endif
/** Directive list entry structure. */
struct yasm_directive {
*/
void yasm_vps_destroy(yasm_valparamhead *headp);
-#ifdef YASM_LIB_INTERNAL
/** Initialize linked list of valparams.
* \param headp linked list
*/
+void yasm_vps_initialize(/*@out@*/ yasm_valparamhead *headp);
#define yasm_vps_initialize(headp) STAILQ_INIT(headp)
/** Destroy (free allocated memory for) linked list of valparams (created with
* \param headp linked list
*/
void yasm_vps_delete(yasm_valparamhead *headp);
-#endif
/** Append valparam to tail of linked list.
* \param headp linked list
* \param vp valparam
*/
void yasm_vps_append(yasm_valparamhead *headp, /*@keep@*/ yasm_valparam *vp);
-#ifdef YASM_LIB_INTERNAL
#define yasm_vps_append(headp, vp) do { \
if (vp) \
STAILQ_INSERT_TAIL(headp, vp, link); \
} while(0)
-#endif
/** Get first valparam in linked list.
* \param headp linked list
*/
/*@null@*/ /*@dependent@*/ yasm_valparam *yasm_vps_first
(yasm_valparamhead *headp);
-#ifdef YASM_LIB_INTERNAL
#define yasm_vps_first(headp) STAILQ_FIRST(headp)
-#endif
/** Get next valparam in linked list.
* \param cur previous valparam in linked list
* \return Next valparam in linked list.
*/
/*@null@*/ /*@dependent@*/ yasm_valparam *yasm_vps_next(yasm_valparam *cur);
-#ifdef YASM_LIB_INTERNAL
#define yasm_vps_next(cur) STAILQ_NEXT(cur, link)
/** Iterate through linked list of valparams.
* \param headp linked list
*/
#define yasm_vps_foreach(iter, headp) STAILQ_FOREACH(iter, headp, link)
-#endif
/** Print linked list of valparams. For debugging purposes.
* \param f file
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
RCSID("$Id$");
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
#include "util.h"
RCSID("$Id$");
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#include <libyasm.h>
#include "lc3barch.h"
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#include <libyasm.h>
#include <util.h>
RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#include <libyasm.h>
#include "x86arch.h"
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
#include <util.h>
RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#include <libyasm.h>
#include "dwarf2-dbgfmt.h"
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#include <libyasm.h>
#include <direct.h>
#endif
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
#include <time.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#include <libyasm.h>
* Each Section is spatially disjoint, and has exactly one SHT entry.
*/
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
#define YASM_OBJFMT_ELF_INTERNAL
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
#define YASM_OBJFMT_ELF_INTERNAL
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
#define YASM_OBJFMT_ELF_INTERNAL
/* optional: automatically prefix underscores to global exported symbols */
/*#define AUTO_UNDERSCORE*/
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
#include <util.h>
RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#include <libyasm.h>
#include "gas-parser.h"
#include <util.h>
RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#include <libyasm.h>
#include "modules/parsers/gas/gas-parser.h"
#include <util.h>
RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#include <libyasm.h>
#include "nasm-parser.h"
#include <util.h>
RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#include <libyasm.h>
#include "modules/parsers/nasm/nasm-parser.h"
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#include <libyasm.h>
#include "nasm.h"
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#include <libyasm.h>
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-#define YASM_LIB_INTERNAL
#include <libyasm.h>
#include "yapp-preproc.h"