PandA-2024.02
Macros | Functions | Variables
mips.c File Reference
#include <stdio.h>
#include "imem.h"
Include dependency graph for mips.c:

Go to the source code of this file.

Macros

#define R   0
 
#define ADDU   33
 
#define SUBU   35
 
#define MULT   24
 
#define MULTU   25
 
#define MFHI   16
 
#define MFLO   18
 
#define AND   36
 
#define OR   37
 
#define XOR   38
 
#define SLL   0
 
#define SRL   2
 
#define SLLV   4
 
#define SRLV   6
 
#define SLT   42
 
#define SLTU   43
 
#define JR   8
 
#define J   2
 
#define JAL   3
 
#define ADDIU   9
 
#define ANDI   12
 
#define ORI   13
 
#define XORI   14
 
#define LW   35
 
#define SW   43
 
#define LUI   15
 
#define BEQ   4
 
#define BNE   5
 
#define BGEZ   1
 
#define SLTI   10
 
#define SLTIU   11
 
#define IADDR(x)   (((x)&0x000000ff)>>2)
 
#define DADDR(x)   (((x)&0x000000ff)>>2)
 

Functions

void __attribute__ ((noinline))
 
int main ()
 

Variables

int main_result
 
const int A [8] = { 22, 5, -9, 3, -17, 38, 0, 11 }
 
const int outData [8] = { -17, -9, 0, 3, 5, 11, 22, 38 }
 

Macro Definition Documentation

◆ ADDIU

#define ADDIU   9

Definition at line 70 of file mips.c.

Referenced by __attribute__().

◆ ADDU

#define ADDU   33

Definition at line 45 of file mips.c.

Referenced by __attribute__().

◆ AND

#define AND   36

Definition at line 54 of file mips.c.

Referenced by __attribute__().

◆ ANDI

#define ANDI   12

Definition at line 71 of file mips.c.

Referenced by __attribute__().

◆ BEQ

#define BEQ   4

Definition at line 79 of file mips.c.

Referenced by __attribute__().

◆ BGEZ

#define BGEZ   1

Definition at line 81 of file mips.c.

Referenced by __attribute__().

◆ BNE

#define BNE   5

Definition at line 80 of file mips.c.

Referenced by __attribute__().

◆ DADDR

#define DADDR (   x)    (((x)&0x000000ff)>>2)

Definition at line 99 of file mips.c.

Referenced by __attribute__().

◆ IADDR

#define IADDR (   x)    (((x)&0x000000ff)>>2)

Definition at line 98 of file mips.c.

Referenced by __attribute__().

◆ J

#define J   2

Definition at line 67 of file mips.c.

Referenced by __attribute__().

◆ JAL

#define JAL   3

Definition at line 68 of file mips.c.

Referenced by __attribute__().

◆ JR

#define JR   8

Definition at line 65 of file mips.c.

Referenced by __attribute__().

◆ LUI

#define LUI   15

Definition at line 77 of file mips.c.

Referenced by __attribute__().

◆ LW

#define LW   35

Definition at line 75 of file mips.c.

Referenced by __attribute__().

◆ MFHI

#define MFHI   16

Definition at line 51 of file mips.c.

Referenced by __attribute__().

◆ MFLO

#define MFLO   18

Definition at line 52 of file mips.c.

Referenced by __attribute__().

◆ MULT

#define MULT   24

Definition at line 48 of file mips.c.

Referenced by __attribute__().

◆ MULTU

#define MULTU   25

Definition at line 49 of file mips.c.

Referenced by __attribute__().

◆ OR

#define OR   37

Definition at line 55 of file mips.c.

Referenced by __attribute__().

◆ ORI

#define ORI   13

Definition at line 72 of file mips.c.

Referenced by __attribute__().

◆ R

#define R   0

Definition at line 43 of file mips.c.

Referenced by __attribute__().

◆ SLL

#define SLL   0

Definition at line 57 of file mips.c.

Referenced by __attribute__().

◆ SLLV

#define SLLV   4

Definition at line 59 of file mips.c.

Referenced by __attribute__().

◆ SLT

#define SLT   42

Definition at line 62 of file mips.c.

Referenced by __attribute__().

◆ SLTI

#define SLTI   10

Definition at line 83 of file mips.c.

Referenced by __attribute__().

◆ SLTIU

#define SLTIU   11

Definition at line 84 of file mips.c.

Referenced by __attribute__().

◆ SLTU

#define SLTU   43

Definition at line 63 of file mips.c.

Referenced by __attribute__().

◆ SRL

#define SRL   2

Definition at line 58 of file mips.c.

Referenced by __attribute__().

◆ SRLV

#define SRLV   6

Definition at line 60 of file mips.c.

Referenced by __attribute__().

◆ SUBU

#define SUBU   35

Definition at line 46 of file mips.c.

Referenced by __attribute__().

◆ SW

#define SW   43

Definition at line 76 of file mips.c.

Referenced by __attribute__().

◆ XOR

#define XOR   38

Definition at line 56 of file mips.c.

Referenced by __attribute__().

◆ XORI

#define XORI   14

Definition at line 73 of file mips.c.

Referenced by __attribute__().

Function Documentation

◆ __attribute__()

void __attribute__ ( (noinline)  )

Definition at line 103 of file mips.c.

References __builtin_bambu_time_start(), __builtin_bambu_time_stop(), A, ADDIU, ADDU, AND, ANDI, BEQ, BGEZ, BNE, DADDR, IADDR, imem, J, JAL, JR, LUI, LW, main(), main_result, MFHI, MFLO, MULT, MULTU, OR, ORI, outData, R, SLL, SLLV, SLT, SLTI, SLTIU, SLTU, SRL, SRLV, SUBU, SW, XOR, and XORI.

Here is the call graph for this function:

◆ main()

int main ( void  )

Definition at line 357 of file mips.c.

References A, imem, main_result, and outData.

Variable Documentation

◆ A

const int A[8] = { 22, 5, -9, 3, -17, 38, 0, 11 }

Definition at line 95 of file mips.c.

◆ main_result

int main_result

Definition at line 40 of file mips.c.

◆ outData

const int outData[8] = { -17, -9, 0, 3, 5, 11, 22, 38 }

Definition at line 96 of file mips.c.


Generated on Mon Feb 12 2024 13:03:05 for PandA-2024.02 by doxygen 1.8.13