Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 375190
b: refs/heads/master
c: bfd08ba
h: refs/heads/master
v: v3
  • Loading branch information
Steven J. Hill authored and Steven J. Hill committed May 1, 2013
1 parent 06d78ab commit 119ba9e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a6a4834cdbef23a7db16e7598c8c6e427ac82531
refs/heads/master: bfd08baae4591eca753afe3c9c63c583c4d4c78a
18 changes: 18 additions & 0 deletions trunk/arch/mips/include/asm/mipsregs.h
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,24 @@

#ifndef __ASSEMBLY__

/*
* Macros for handling the ISA mode bit for microMIPS.
*/
#define get_isa16_mode(x) ((x) & 0x1)
#define msk_isa16_mode(x) ((x) & ~0x1)
#define set_isa16_mode(x) do { (x) |= 0x1; } while(0)

/*
* microMIPS instructions can be 16-bit or 32-bit in length. This
* returns a 1 if the instruction is 16-bit and a 0 if 32-bit.
*/
static inline int mm_insn_16bit(u16 insn)
{
u16 opcode = (insn >> 10) & 0x7;

return (opcode >= 1 && opcode <= 3) ? 1 : 0;
}

/*
* Functions to access the R10000 performance counters. These are basically
* mfc0 and mtc0 instructions from and to coprocessor register with a 5-bit
Expand Down

0 comments on commit 119ba9e

Please sign in to comment.