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

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 67 of file mips.c.

Referenced by main().

◆ ADDU

#define ADDU   33

Definition at line 42 of file mips.c.

Referenced by main().

◆ AND

#define AND   36

Definition at line 51 of file mips.c.

Referenced by Range::And(), main(), and Range::shr().

◆ ANDI

#define ANDI   12

Definition at line 68 of file mips.c.

Referenced by main().

◆ BEQ

#define BEQ   4

Definition at line 76 of file mips.c.

Referenced by main().

◆ BGEZ

#define BGEZ   1

Definition at line 78 of file mips.c.

Referenced by main().

◆ BNE

#define BNE   5

Definition at line 77 of file mips.c.

Referenced by main().

◆ DADDR

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

Definition at line 95 of file mips.c.

Referenced by main().

◆ IADDR

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

Definition at line 94 of file mips.c.

Referenced by main().

◆ J

#define J   2

Definition at line 64 of file mips.c.

Referenced by __attribute__(), and main().

◆ JAL

#define JAL   3

Definition at line 65 of file mips.c.

Referenced by main().

◆ JR

#define JR   8

Definition at line 62 of file mips.c.

Referenced by main().

◆ LUI

#define LUI   15

Definition at line 74 of file mips.c.

Referenced by main().

◆ LW

#define LW   35

Definition at line 72 of file mips.c.

Referenced by main().

◆ MFHI

#define MFHI   16

Definition at line 48 of file mips.c.

Referenced by main().

◆ MFLO

#define MFLO   18

Definition at line 49 of file mips.c.

Referenced by main().

◆ MULT

#define MULT   24

Definition at line 45 of file mips.c.

Referenced by main().

◆ MULTU

#define MULTU   25

Definition at line 46 of file mips.c.

Referenced by main().

◆ OR

#define OR   37

Definition at line 52 of file mips.c.

Referenced by main(), Range::Or(), and Range::shr().

◆ ORI

#define ORI   13

Definition at line 69 of file mips.c.

Referenced by main().

◆ R

#define R   0

◆ SLL

#define SLL   0

Definition at line 54 of file mips.c.

Referenced by main().

◆ SLLV

#define SLLV   4

Definition at line 56 of file mips.c.

Referenced by main().

◆ SLT

#define SLT   42

Definition at line 59 of file mips.c.

Referenced by main().

◆ SLTI

#define SLTI   10

Definition at line 80 of file mips.c.

Referenced by main().

◆ SLTIU

#define SLTIU   11

Definition at line 81 of file mips.c.

Referenced by main().

◆ SLTU

#define SLTU   43

Definition at line 60 of file mips.c.

Referenced by main().

◆ SRL

#define SRL   2

Definition at line 55 of file mips.c.

Referenced by main().

◆ SRLV

#define SRLV   6

Definition at line 57 of file mips.c.

Referenced by main().

◆ SUBU

#define SUBU   35

Definition at line 43 of file mips.c.

Referenced by main().

◆ SW

#define SW   43

Definition at line 73 of file mips.c.

Referenced by main().

◆ XOR

#define XOR   38

Definition at line 53 of file mips.c.

Referenced by main().

◆ XORI

#define XORI   14

Definition at line 70 of file mips.c.

Referenced by main().

Function Documentation

◆ main()

int main ( void  )

Definition at line 98 of file mips.c.

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

Referenced by __attribute__().

Here is the caller graph for this function:

Variable Documentation

◆ A

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

Definition at line 91 of file mips.c.

Referenced by __attribute__(), and main().

◆ main_result

int main_result

◆ outData

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

Definition at line 92 of file mips.c.

Referenced by __attribute__(), and main().


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