#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "ac_decoder.h"
Include dependency graph for ac_decoder.c:
Go to the source code of this file.
Defines | |
#define | BUFFER(index) ((index<*quant) ? (buffer[index]) : (*quant=ExpandInstrBuffer(index),buffer[index])) |
Functions | |
int | ExpandInstrBuffer (int index) |
External function that updates the instruction buffer pointer, the quantity and the relative index. | |
unsigned long long | GetBits (unsigned char *buffer, int *quant, int last, int quantity, int sign) |
char * | NewString (const char *s) |
void | ShowDecField (ac_dec_field *f) |
void | ShowDecFormat (ac_dec_format *f) |
void | ShowDecodeList (ac_dec_list *l) |
void | ShowDecInstr (ac_dec_instr *i) |
void | ShowDecoder (ac_decoder *d, unsigned level) |
void | MemoryError (char *fileName, long lineNumber, char *functionName) |
void | ShowError (char *msg) |
int | CompareFields (const void *p1, const void *p2) |
Compare two fields. Used in qsort and bsearch. | |
int | CheckFields (const ac_dec_field *f1, const ac_dec_field *f2) |
void | FreeDecField (ac_dec_field *f) |
ac_dec_field * | FindDecField (ac_dec_field *fields, char *name) |
ac_dec_field * | PutIDs (ac_dec_format *formats, unsigned nFields) |
ac_decoder * | AddToDecoder (ac_decoder *decoder, ac_dec_instr *instruction, ac_dec_field *fields) |
ac_decoder_full * | CreateDecoder (ac_dec_format *formats, ac_dec_instr *instructions) |
ac_dec_instr * | FindInstruction (ac_decoder_full *decoder, unsigned char *buffer, int quant) |
ac_dec_format * | FindFormat (ac_dec_format *formats, char *name) |
ac_dec_instr * | GetInstrByID (ac_dec_instr *instr, int id) |
unsigned * | DecodeAsInstruction (ac_decoder_full *decoder, ac_dec_instr *instruction, unsigned char *buffer, int quant) |
unsigned * | Decode (ac_decoder_full *decoder, unsigned char *buffer, int quant) |
This file contains the functions needed to create the decoder for the target ISA described in the ArchC file.
Definition in file ac_decoder.c.
|
Allocate only the first time Looking for the instruction format structure. Get Format's field list Definition at line 505 of file ac_decoder.c. References ac_dec_field, ac_dec_format, ac_dec_instr, decoder, _ac_dec_instr::format, and GetBits(). |
Here is the call graph for this function:
|
External function that updates the instruction buffer pointer, the quantity and the relative index. Function for decoder that updates the instruction buffer pointer, the bytes quantity available and the old relative index. Definition at line 84 of file archc.cpp. References AC_ERROR. |
|
Read the buffer using this macro Definition at line 45 of file ac_decoder.c. Referenced by DecodeAsInstruction(). |
|
This function copies a string into a new allocated memory region
Definition at line 106 of file ac_decoder.c. |