mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-10-10 00:25:06 -04:00
- Remove linear lookups - Enable output of relocations in the map file - Other performance fixes Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
27 lines
441 B
C
27 lines
441 B
C
/* SPDX-License-Identifier: BSD-2-Clause */
|
|
/* Copyright 1996-2018 The NASM Authors - All Rights Reserved */
|
|
|
|
/*
|
|
* nasmlib.c library routines for the Netwide Assembler
|
|
*/
|
|
|
|
#include "compiler.h"
|
|
#include "nasm.h"
|
|
#include "nasmlib.h"
|
|
#include "insns.h"
|
|
|
|
static int32_t next_seg = 2;
|
|
|
|
int32_t seg_alloc(void)
|
|
{
|
|
int32_t this_seg = next_seg;
|
|
|
|
next_seg += 2;
|
|
return this_seg;
|
|
}
|
|
|
|
int32_t seg_maxindex(void)
|
|
{
|
|
return next_seg;
|
|
}
|