void machine_dependent_init (void) {
+ struct template *template = template_table;
struct hashtab_name *key;
struct reg_entry *reg_entry;
struct templates *templates;
- struct template *template = template_table;
struct model_entry *model_entry;
-
int ch;
templates = xmalloc (sizeof (*templates));
break;
}
- if (xstrcasecmp (arg, "use16") == 0) {
+ if (xstrcasecmp (arg, "byte") == 0) {
+
+ /* TODO: Figure out what needs to be done. */
+
+ } else if (xstrcasecmp (arg, "word") == 0) {
+
+ /* TODO: Figure out what needs to be done. */
+
+ } else if (xstrcasecmp (arg, "public") == 0) {
+
+ /* TODO: Figure out what needs to be done. */
+
+ } else if (xstrcasecmp (arg, "use16") == 0) {
machine_dependent_set_march ("i8086+8087");
bits = 16;
machine_dependent_set_march ("i386+387");
bits = 32;
- } else if (xstrcasecmp (arg, "code")) {
+ } else if (xstrcasecmp (arg, "code") == 0) {
section_set_by_name (".text");
- } else if (xstrcasecmp (arg, "data")) {
+ } else if (xstrcasecmp (arg, "data") == 0) {
section_set_by_name (".data");
- } else if (xstrcasecmp (arg, "bss")) {
+ } else if (xstrcasecmp (arg, "bss") == 0) {
section_set_by_name (".bss");
} else {
* @file kwd.c
*****************************************************************************/
#include <ctype.h>
+#include <limits.h>
#include <stdlib.h>
#include <string.h>
void machine_dependent_number_to_chars (unsigned char *p, uint64_t number, unsigned int size);
-unsigned long array_to_integer (unsigned char *arr, int size) {
+static unsigned long array_to_integer (unsigned char *arr, int size) {
unsigned long value = 0;
int i;
}
+ if (xstrcasecmp (sname, "DGROUP") == 0 && *caret == ':') {
+
+ caret++;
+ continue;
+
+ }
+
cstr_cat (&cstr, start, caret - start);
continue;
}
extern void machine_dependent_assemble_line (char *start, char *line);
+extern void machine_dependent_handle_label (char *start, char **line);
extern void machine_dependent_handle_proc (char *start, char **pp, char *name);
extern void machine_dependent_handle_endp (char *start, char *name);
}
+ if (xstrcasecmp (directive, "label") == 0) {
+
+ symbol = symbol_label (start, caret, arg);
+ symbol->scope = SYMBOL_SCOPE_LOCAL;
+
+ free (directive);
+
+ ignore_rest_of_line (&line);
+ goto check;
+
+ }
+
if (xstrcasecmp (directive, "proc") == 0) {
machine_dependent_handle_proc (start, &line, arg);