mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 06:34:12 +08:00
Merge branch 'for-linus' of git://github.com/cmetcalf-tilera/linux-tile
* 'for-linus' of git://github.com/cmetcalf-tilera/linux-tile: arch/tile: factor out <arch/opcode.h> header arch/tile: add the <arch> headers to the set of installed kernel headers arch/tile: avoid exporting a symbol no longer used by gcc arch/tile: avoid ISO namespace pollution with <asm/sigcontext.h>
This commit is contained in:
commit
1583171492
17
arch/tile/include/arch/Kbuild
Normal file
17
arch/tile/include/arch/Kbuild
Normal file
@ -0,0 +1,17 @@
|
||||
header-y += abi.h
|
||||
header-y += chip.h
|
||||
header-y += chip_tile64.h
|
||||
header-y += chip_tilegx.h
|
||||
header-y += chip_tilepro.h
|
||||
header-y += icache.h
|
||||
header-y += interrupts.h
|
||||
header-y += interrupts_32.h
|
||||
header-y += interrupts_64.h
|
||||
header-y += opcode.h
|
||||
header-y += opcode_tilegx.h
|
||||
header-y += opcode_tilepro.h
|
||||
header-y += sim.h
|
||||
header-y += sim_def.h
|
||||
header-y += spr_def.h
|
||||
header-y += spr_def_32.h
|
||||
header-y += spr_def_64.h
|
@ -15,13 +15,78 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* ABI-related register definitions helpful when writing assembly code.
|
||||
* ABI-related register definitions.
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_ABI_H__
|
||||
#define __ARCH_ABI_H__
|
||||
|
||||
#include <arch/chip.h>
|
||||
#if !defined __need_int_reg_t && !defined __DOXYGEN__
|
||||
# define __ARCH_ABI_H__
|
||||
# include <arch/chip.h>
|
||||
#endif
|
||||
|
||||
/* Provide the basic machine types. */
|
||||
#ifndef __INT_REG_BITS
|
||||
|
||||
/** Number of bits in a register. */
|
||||
#if defined __tilegx__
|
||||
# define __INT_REG_BITS 64
|
||||
#elif defined __tilepro__
|
||||
# define __INT_REG_BITS 32
|
||||
#elif !defined __need_int_reg_t
|
||||
# include <arch/chip.h>
|
||||
# define __INT_REG_BITS CHIP_WORD_SIZE()
|
||||
#else
|
||||
# error Unrecognized architecture with __need_int_reg_t
|
||||
#endif
|
||||
|
||||
#if __INT_REG_BITS == 64
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
/** Unsigned type that can hold a register. */
|
||||
typedef unsigned long long __uint_reg_t;
|
||||
|
||||
/** Signed type that can hold a register. */
|
||||
typedef long long __int_reg_t;
|
||||
#endif
|
||||
|
||||
/** String prefix to use for printf(). */
|
||||
#define __INT_REG_FMT "ll"
|
||||
|
||||
#else
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
/** Unsigned type that can hold a register. */
|
||||
typedef unsigned long __uint_reg_t;
|
||||
|
||||
/** Signed type that can hold a register. */
|
||||
typedef long __int_reg_t;
|
||||
#endif
|
||||
|
||||
/** String prefix to use for printf(). */
|
||||
#define __INT_REG_FMT "l"
|
||||
|
||||
#endif
|
||||
#endif /* __INT_REG_BITS */
|
||||
|
||||
|
||||
#ifndef __need_int_reg_t
|
||||
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
/** Unsigned type that can hold a register. */
|
||||
typedef __uint_reg_t uint_reg_t;
|
||||
|
||||
/** Signed type that can hold a register. */
|
||||
typedef __int_reg_t int_reg_t;
|
||||
#endif
|
||||
|
||||
/** String prefix to use for printf(). */
|
||||
#define INT_REG_FMT __INT_REG_FMT
|
||||
|
||||
/** Number of bits in a register. */
|
||||
#define INT_REG_BITS __INT_REG_BITS
|
||||
|
||||
|
||||
/* Registers 0 - 55 are "normal", but some perform special roles. */
|
||||
|
||||
@ -59,7 +124,7 @@
|
||||
* The ABI requires callers to allocate a caller state save area of
|
||||
* this many bytes at the bottom of each stack frame.
|
||||
*/
|
||||
#define C_ABI_SAVE_AREA_SIZE (2 * (CHIP_WORD_SIZE() / 8))
|
||||
#define C_ABI_SAVE_AREA_SIZE (2 * (INT_REG_BITS / 8))
|
||||
|
||||
/**
|
||||
* The operand to an 'info' opcode directing the backtracer to not
|
||||
@ -67,30 +132,10 @@
|
||||
*/
|
||||
#define INFO_OP_CANNOT_BACKTRACE 2
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
#if CHIP_WORD_SIZE() > 32
|
||||
|
||||
/** Unsigned type that can hold a register. */
|
||||
typedef unsigned long long uint_reg_t;
|
||||
#endif /* !__need_int_reg_t */
|
||||
|
||||
/** Signed type that can hold a register. */
|
||||
typedef long long int_reg_t;
|
||||
|
||||
/** String prefix to use for printf(). */
|
||||
#define INT_REG_FMT "ll"
|
||||
|
||||
#elif !defined(__LP64__) /* avoid confusion with LP64 cross-build tools */
|
||||
|
||||
/** Unsigned type that can hold a register. */
|
||||
typedef unsigned long uint_reg_t;
|
||||
|
||||
/** Signed type that can hold a register. */
|
||||
typedef long int_reg_t;
|
||||
|
||||
/** String prefix to use for printf(). */
|
||||
#define INT_REG_FMT "l"
|
||||
|
||||
#endif
|
||||
#endif /* __ASSEMBLER__ */
|
||||
/* Make sure we later can get all the definitions and declarations. */
|
||||
#undef __need_int_reg_t
|
||||
|
||||
#endif /* !__ARCH_ABI_H__ */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010 Tilera Corporation. All Rights Reserved.
|
||||
* Copyright 2011 Tilera Corporation. All Rights Reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -12,15 +12,10 @@
|
||||
* more details.
|
||||
*/
|
||||
|
||||
#ifndef _ASM_TILE_OPCODE_CONSTANTS_H
|
||||
#define _ASM_TILE_OPCODE_CONSTANTS_H
|
||||
|
||||
#include <arch/chip.h>
|
||||
|
||||
#if CHIP_WORD_SIZE() == 64
|
||||
#include <asm/opcode_constants_64.h>
|
||||
#if defined(__tilepro__)
|
||||
#include <arch/opcode_tilepro.h>
|
||||
#elif defined(__tilegx__)
|
||||
#include <arch/opcode_tilegx.h>
|
||||
#else
|
||||
#include <asm/opcode_constants_32.h>
|
||||
#error Unexpected Tilera chip type
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_TILE_OPCODE_CONSTANTS_H */
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
/* TILE-Gx opcode information.
|
||||
*
|
||||
* Copyright 2011 Tilera Corporation. All Rights Reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@ -10,13 +11,805 @@
|
||||
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
|
||||
* NON INFRINGEMENT. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/* This file is machine-generated; DO NOT EDIT! */
|
||||
#ifndef __ARCH_OPCODE_H__
|
||||
#define __ARCH_OPCODE_H__
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
typedef unsigned long long tilegx_bundle_bits;
|
||||
|
||||
/* These are the bits that determine if a bundle is in the X encoding. */
|
||||
#define TILEGX_BUNDLE_MODE_MASK ((tilegx_bundle_bits)3 << 62)
|
||||
|
||||
enum
|
||||
{
|
||||
/* Maximum number of instructions in a bundle (2 for X, 3 for Y). */
|
||||
TILEGX_MAX_INSTRUCTIONS_PER_BUNDLE = 3,
|
||||
|
||||
/* How many different pipeline encodings are there? X0, X1, Y0, Y1, Y2. */
|
||||
TILEGX_NUM_PIPELINE_ENCODINGS = 5,
|
||||
|
||||
/* Log base 2 of TILEGX_BUNDLE_SIZE_IN_BYTES. */
|
||||
TILEGX_LOG2_BUNDLE_SIZE_IN_BYTES = 3,
|
||||
|
||||
/* Instructions take this many bytes. */
|
||||
TILEGX_BUNDLE_SIZE_IN_BYTES = 1 << TILEGX_LOG2_BUNDLE_SIZE_IN_BYTES,
|
||||
|
||||
/* Log base 2 of TILEGX_BUNDLE_ALIGNMENT_IN_BYTES. */
|
||||
TILEGX_LOG2_BUNDLE_ALIGNMENT_IN_BYTES = 3,
|
||||
|
||||
/* Bundles should be aligned modulo this number of bytes. */
|
||||
TILEGX_BUNDLE_ALIGNMENT_IN_BYTES =
|
||||
(1 << TILEGX_LOG2_BUNDLE_ALIGNMENT_IN_BYTES),
|
||||
|
||||
/* Number of registers (some are magic, such as network I/O). */
|
||||
TILEGX_NUM_REGISTERS = 64,
|
||||
};
|
||||
|
||||
/* Make a few "tile_" variables to simplify common code between
|
||||
architectures. */
|
||||
|
||||
typedef tilegx_bundle_bits tile_bundle_bits;
|
||||
#define TILE_BUNDLE_SIZE_IN_BYTES TILEGX_BUNDLE_SIZE_IN_BYTES
|
||||
#define TILE_BUNDLE_ALIGNMENT_IN_BYTES TILEGX_BUNDLE_ALIGNMENT_IN_BYTES
|
||||
#define TILE_LOG2_BUNDLE_ALIGNMENT_IN_BYTES \
|
||||
TILEGX_LOG2_BUNDLE_ALIGNMENT_IN_BYTES
|
||||
|
||||
/* 64-bit pattern for a { bpt ; nop } bundle. */
|
||||
#define TILEGX_BPT_BUNDLE 0x286a44ae51485000ULL
|
||||
|
||||
static __inline unsigned int
|
||||
get_BFEnd_X0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 12)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_BFOpcodeExtension_X0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 24)) & 0xf);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_BFStart_X0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 18)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_BrOff_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 31)) & 0x0000003f) |
|
||||
(((unsigned int)(n >> 37)) & 0x0001ffc0);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_BrType_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 54)) & 0x1f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Dest_Imm8_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 31)) & 0x0000003f) |
|
||||
(((unsigned int)(n >> 43)) & 0x000000c0);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Dest_X0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 0)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Dest_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 31)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Dest_Y0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 0)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Dest_Y1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 31)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Imm16_X0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 12)) & 0xffff);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Imm16_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 43)) & 0xffff);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Imm8OpcodeExtension_X0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 20)) & 0xff);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Imm8OpcodeExtension_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 51)) & 0xff);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Imm8_X0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 12)) & 0xff);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Imm8_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 43)) & 0xff);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Imm8_Y0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 12)) & 0xff);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Imm8_Y1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 43)) & 0xff);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_JumpOff_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 31)) & 0x7ffffff);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_JumpOpcodeExtension_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 58)) & 0x1);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_MF_Imm14_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 37)) & 0x3fff);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_MT_Imm14_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 31)) & 0x0000003f) |
|
||||
(((unsigned int)(n >> 37)) & 0x00003fc0);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Mode(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 62)) & 0x3);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Opcode_X0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 28)) & 0x7);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Opcode_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 59)) & 0x7);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Opcode_Y0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 27)) & 0xf);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Opcode_Y1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 58)) & 0xf);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_Opcode_Y2(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((n >> 26)) & 0x00000001) |
|
||||
(((unsigned int)(n >> 56)) & 0x00000002);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_RRROpcodeExtension_X0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 18)) & 0x3ff);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_RRROpcodeExtension_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 49)) & 0x3ff);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_RRROpcodeExtension_Y0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 18)) & 0x3);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_RRROpcodeExtension_Y1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 49)) & 0x3);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_ShAmt_X0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 12)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_ShAmt_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 43)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_ShAmt_Y0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 12)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_ShAmt_Y1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 43)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_ShiftOpcodeExtension_X0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 18)) & 0x3ff);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_ShiftOpcodeExtension_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 49)) & 0x3ff);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_ShiftOpcodeExtension_Y0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 18)) & 0x3);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_ShiftOpcodeExtension_Y1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 49)) & 0x3);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_SrcA_X0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 6)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_SrcA_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 37)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_SrcA_Y0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 6)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_SrcA_Y1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 37)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_SrcA_Y2(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 20)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_SrcBDest_Y2(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 51)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_SrcB_X0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 12)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_SrcB_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 43)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_SrcB_Y0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 12)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_SrcB_Y1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 43)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_UnaryOpcodeExtension_X0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 12)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_UnaryOpcodeExtension_X1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 43)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_UnaryOpcodeExtension_Y0(tilegx_bundle_bits num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((n >> 12)) & 0x3f);
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
get_UnaryOpcodeExtension_Y1(tilegx_bundle_bits n)
|
||||
{
|
||||
return (((unsigned int)(n >> 43)) & 0x3f);
|
||||
}
|
||||
|
||||
|
||||
static __inline int
|
||||
sign_extend(int n, int num_bits)
|
||||
{
|
||||
int shift = (int)(sizeof(int) * 8 - num_bits);
|
||||
return (n << shift) >> shift;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_BFEnd_X0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3f) << 12);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_BFOpcodeExtension_X0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0xf) << 24);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_BFStart_X0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3f) << 18);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_BrOff_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x0000003f)) << 31) |
|
||||
(((tilegx_bundle_bits)(n & 0x0001ffc0)) << 37);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_BrType_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x1f)) << 54);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Dest_Imm8_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x0000003f)) << 31) |
|
||||
(((tilegx_bundle_bits)(n & 0x000000c0)) << 43);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Dest_X0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3f) << 0);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Dest_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3f)) << 31);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Dest_Y0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3f) << 0);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Dest_Y1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3f)) << 31);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Imm16_X0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0xffff) << 12);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Imm16_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0xffff)) << 43);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Imm8OpcodeExtension_X0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0xff) << 20);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Imm8OpcodeExtension_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0xff)) << 51);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Imm8_X0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0xff) << 12);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Imm8_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0xff)) << 43);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Imm8_Y0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0xff) << 12);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Imm8_Y1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0xff)) << 43);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_JumpOff_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x7ffffff)) << 31);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_JumpOpcodeExtension_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x1)) << 58);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_MF_Imm14_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3fff)) << 37);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_MT_Imm14_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x0000003f)) << 31) |
|
||||
(((tilegx_bundle_bits)(n & 0x00003fc0)) << 37);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Mode(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3)) << 62);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Opcode_X0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x7) << 28);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Opcode_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x7)) << 59);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Opcode_Y0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0xf) << 27);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Opcode_Y1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0xf)) << 58);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_Opcode_Y2(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x00000001) << 26) |
|
||||
(((tilegx_bundle_bits)(n & 0x00000002)) << 56);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_RRROpcodeExtension_X0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3ff) << 18);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_RRROpcodeExtension_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3ff)) << 49);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_RRROpcodeExtension_Y0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3) << 18);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_RRROpcodeExtension_Y1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3)) << 49);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_ShAmt_X0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3f) << 12);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_ShAmt_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3f)) << 43);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_ShAmt_Y0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3f) << 12);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_ShAmt_Y1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3f)) << 43);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_ShiftOpcodeExtension_X0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3ff) << 18);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_ShiftOpcodeExtension_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3ff)) << 49);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_ShiftOpcodeExtension_Y0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3) << 18);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_ShiftOpcodeExtension_Y1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3)) << 49);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_SrcA_X0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3f) << 6);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_SrcA_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3f)) << 37);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_SrcA_Y0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3f) << 6);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_SrcA_Y1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3f)) << 37);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_SrcA_Y2(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3f) << 20);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_SrcBDest_Y2(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3f)) << 51);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_SrcB_X0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3f) << 12);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_SrcB_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3f)) << 43);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_SrcB_Y0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3f) << 12);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_SrcB_Y1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3f)) << 43);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_UnaryOpcodeExtension_X0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3f) << 12);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_UnaryOpcodeExtension_X1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3f)) << 43);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_UnaryOpcodeExtension_Y0(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return ((n & 0x3f) << 12);
|
||||
}
|
||||
|
||||
static __inline tilegx_bundle_bits
|
||||
create_UnaryOpcodeExtension_Y1(int num)
|
||||
{
|
||||
const unsigned int n = (unsigned int)num;
|
||||
return (((tilegx_bundle_bits)(n & 0x3f)) << 43);
|
||||
}
|
||||
|
||||
|
||||
#ifndef _TILE_OPCODE_CONSTANTS_H
|
||||
#define _TILE_OPCODE_CONSTANTS_H
|
||||
enum
|
||||
{
|
||||
ADDI_IMM8_OPCODE_X0 = 1,
|
||||
@ -606,4 +1399,7 @@ enum
|
||||
XOR_RRR_5_OPCODE_Y1 = 3
|
||||
};
|
||||
|
||||
#endif /* !_TILE_OPCODE_CONSTANTS_H */
|
||||
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
#endif /* __ARCH_OPCODE_H__ */
|
1471
arch/tile/include/arch/opcode_tilepro.h
Normal file
1471
arch/tile/include/arch/opcode_tilepro.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,7 @@
|
||||
include include/asm-generic/Kbuild.asm
|
||||
|
||||
header-y += ../arch/
|
||||
|
||||
header-y += ucontext.h
|
||||
header-y += hardwall.h
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,480 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010 Tilera Corporation. All Rights Reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation, version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
|
||||
* NON INFRINGEMENT. See the GNU General Public License for
|
||||
* more details.
|
||||
*/
|
||||
|
||||
/* This file is machine-generated; DO NOT EDIT! */
|
||||
|
||||
|
||||
#ifndef _TILE_OPCODE_CONSTANTS_H
|
||||
#define _TILE_OPCODE_CONSTANTS_H
|
||||
enum
|
||||
{
|
||||
ADDBS_U_SPECIAL_0_OPCODE_X0 = 98,
|
||||
ADDBS_U_SPECIAL_0_OPCODE_X1 = 68,
|
||||
ADDB_SPECIAL_0_OPCODE_X0 = 1,
|
||||
ADDB_SPECIAL_0_OPCODE_X1 = 1,
|
||||
ADDHS_SPECIAL_0_OPCODE_X0 = 99,
|
||||
ADDHS_SPECIAL_0_OPCODE_X1 = 69,
|
||||
ADDH_SPECIAL_0_OPCODE_X0 = 2,
|
||||
ADDH_SPECIAL_0_OPCODE_X1 = 2,
|
||||
ADDIB_IMM_0_OPCODE_X0 = 1,
|
||||
ADDIB_IMM_0_OPCODE_X1 = 1,
|
||||
ADDIH_IMM_0_OPCODE_X0 = 2,
|
||||
ADDIH_IMM_0_OPCODE_X1 = 2,
|
||||
ADDI_IMM_0_OPCODE_X0 = 3,
|
||||
ADDI_IMM_0_OPCODE_X1 = 3,
|
||||
ADDI_IMM_1_OPCODE_SN = 1,
|
||||
ADDI_OPCODE_Y0 = 9,
|
||||
ADDI_OPCODE_Y1 = 7,
|
||||
ADDLIS_OPCODE_X0 = 1,
|
||||
ADDLIS_OPCODE_X1 = 2,
|
||||
ADDLI_OPCODE_X0 = 2,
|
||||
ADDLI_OPCODE_X1 = 3,
|
||||
ADDS_SPECIAL_0_OPCODE_X0 = 96,
|
||||
ADDS_SPECIAL_0_OPCODE_X1 = 66,
|
||||
ADD_SPECIAL_0_OPCODE_X0 = 3,
|
||||
ADD_SPECIAL_0_OPCODE_X1 = 3,
|
||||
ADD_SPECIAL_0_OPCODE_Y0 = 0,
|
||||
ADD_SPECIAL_0_OPCODE_Y1 = 0,
|
||||
ADIFFB_U_SPECIAL_0_OPCODE_X0 = 4,
|
||||
ADIFFH_SPECIAL_0_OPCODE_X0 = 5,
|
||||
ANDI_IMM_0_OPCODE_X0 = 1,
|
||||
ANDI_IMM_0_OPCODE_X1 = 4,
|
||||
ANDI_OPCODE_Y0 = 10,
|
||||
ANDI_OPCODE_Y1 = 8,
|
||||
AND_SPECIAL_0_OPCODE_X0 = 6,
|
||||
AND_SPECIAL_0_OPCODE_X1 = 4,
|
||||
AND_SPECIAL_2_OPCODE_Y0 = 0,
|
||||
AND_SPECIAL_2_OPCODE_Y1 = 0,
|
||||
AULI_OPCODE_X0 = 3,
|
||||
AULI_OPCODE_X1 = 4,
|
||||
AVGB_U_SPECIAL_0_OPCODE_X0 = 7,
|
||||
AVGH_SPECIAL_0_OPCODE_X0 = 8,
|
||||
BBNST_BRANCH_OPCODE_X1 = 15,
|
||||
BBNS_BRANCH_OPCODE_X1 = 14,
|
||||
BBNS_OPCODE_SN = 63,
|
||||
BBST_BRANCH_OPCODE_X1 = 13,
|
||||
BBS_BRANCH_OPCODE_X1 = 12,
|
||||
BBS_OPCODE_SN = 62,
|
||||
BGEZT_BRANCH_OPCODE_X1 = 7,
|
||||
BGEZ_BRANCH_OPCODE_X1 = 6,
|
||||
BGEZ_OPCODE_SN = 61,
|
||||
BGZT_BRANCH_OPCODE_X1 = 5,
|
||||
BGZ_BRANCH_OPCODE_X1 = 4,
|
||||
BGZ_OPCODE_SN = 58,
|
||||
BITX_UN_0_SHUN_0_OPCODE_X0 = 1,
|
||||
BITX_UN_0_SHUN_0_OPCODE_Y0 = 1,
|
||||
BLEZT_BRANCH_OPCODE_X1 = 11,
|
||||
BLEZ_BRANCH_OPCODE_X1 = 10,
|
||||
BLEZ_OPCODE_SN = 59,
|
||||
BLZT_BRANCH_OPCODE_X1 = 9,
|
||||
BLZ_BRANCH_OPCODE_X1 = 8,
|
||||
BLZ_OPCODE_SN = 60,
|
||||
BNZT_BRANCH_OPCODE_X1 = 3,
|
||||
BNZ_BRANCH_OPCODE_X1 = 2,
|
||||
BNZ_OPCODE_SN = 57,
|
||||
BPT_NOREG_RR_IMM_0_OPCODE_SN = 1,
|
||||
BRANCH_OPCODE_X1 = 5,
|
||||
BYTEX_UN_0_SHUN_0_OPCODE_X0 = 2,
|
||||
BYTEX_UN_0_SHUN_0_OPCODE_Y0 = 2,
|
||||
BZT_BRANCH_OPCODE_X1 = 1,
|
||||
BZ_BRANCH_OPCODE_X1 = 0,
|
||||
BZ_OPCODE_SN = 56,
|
||||
CLZ_UN_0_SHUN_0_OPCODE_X0 = 3,
|
||||
CLZ_UN_0_SHUN_0_OPCODE_Y0 = 3,
|
||||
CRC32_32_SPECIAL_0_OPCODE_X0 = 9,
|
||||
CRC32_8_SPECIAL_0_OPCODE_X0 = 10,
|
||||
CTZ_UN_0_SHUN_0_OPCODE_X0 = 4,
|
||||
CTZ_UN_0_SHUN_0_OPCODE_Y0 = 4,
|
||||
DRAIN_UN_0_SHUN_0_OPCODE_X1 = 1,
|
||||
DTLBPR_UN_0_SHUN_0_OPCODE_X1 = 2,
|
||||
DWORD_ALIGN_SPECIAL_0_OPCODE_X0 = 95,
|
||||
FINV_UN_0_SHUN_0_OPCODE_X1 = 3,
|
||||
FLUSH_UN_0_SHUN_0_OPCODE_X1 = 4,
|
||||
FNOP_NOREG_RR_IMM_0_OPCODE_SN = 3,
|
||||
FNOP_UN_0_SHUN_0_OPCODE_X0 = 5,
|
||||
FNOP_UN_0_SHUN_0_OPCODE_X1 = 5,
|
||||
FNOP_UN_0_SHUN_0_OPCODE_Y0 = 5,
|
||||
FNOP_UN_0_SHUN_0_OPCODE_Y1 = 1,
|
||||
HALT_NOREG_RR_IMM_0_OPCODE_SN = 0,
|
||||
ICOH_UN_0_SHUN_0_OPCODE_X1 = 6,
|
||||
ILL_UN_0_SHUN_0_OPCODE_X1 = 7,
|
||||
ILL_UN_0_SHUN_0_OPCODE_Y1 = 2,
|
||||
IMM_0_OPCODE_SN = 0,
|
||||
IMM_0_OPCODE_X0 = 4,
|
||||
IMM_0_OPCODE_X1 = 6,
|
||||
IMM_1_OPCODE_SN = 1,
|
||||
IMM_OPCODE_0_X0 = 5,
|
||||
INTHB_SPECIAL_0_OPCODE_X0 = 11,
|
||||
INTHB_SPECIAL_0_OPCODE_X1 = 5,
|
||||
INTHH_SPECIAL_0_OPCODE_X0 = 12,
|
||||
INTHH_SPECIAL_0_OPCODE_X1 = 6,
|
||||
INTLB_SPECIAL_0_OPCODE_X0 = 13,
|
||||
INTLB_SPECIAL_0_OPCODE_X1 = 7,
|
||||
INTLH_SPECIAL_0_OPCODE_X0 = 14,
|
||||
INTLH_SPECIAL_0_OPCODE_X1 = 8,
|
||||
INV_UN_0_SHUN_0_OPCODE_X1 = 8,
|
||||
IRET_UN_0_SHUN_0_OPCODE_X1 = 9,
|
||||
JALB_OPCODE_X1 = 13,
|
||||
JALF_OPCODE_X1 = 12,
|
||||
JALRP_SPECIAL_0_OPCODE_X1 = 9,
|
||||
JALRR_IMM_1_OPCODE_SN = 3,
|
||||
JALR_RR_IMM_0_OPCODE_SN = 5,
|
||||
JALR_SPECIAL_0_OPCODE_X1 = 10,
|
||||
JB_OPCODE_X1 = 11,
|
||||
JF_OPCODE_X1 = 10,
|
||||
JRP_SPECIAL_0_OPCODE_X1 = 11,
|
||||
JRR_IMM_1_OPCODE_SN = 2,
|
||||
JR_RR_IMM_0_OPCODE_SN = 4,
|
||||
JR_SPECIAL_0_OPCODE_X1 = 12,
|
||||
LBADD_IMM_0_OPCODE_X1 = 22,
|
||||
LBADD_U_IMM_0_OPCODE_X1 = 23,
|
||||
LB_OPCODE_Y2 = 0,
|
||||
LB_UN_0_SHUN_0_OPCODE_X1 = 10,
|
||||
LB_U_OPCODE_Y2 = 1,
|
||||
LB_U_UN_0_SHUN_0_OPCODE_X1 = 11,
|
||||
LHADD_IMM_0_OPCODE_X1 = 24,
|
||||
LHADD_U_IMM_0_OPCODE_X1 = 25,
|
||||
LH_OPCODE_Y2 = 2,
|
||||
LH_UN_0_SHUN_0_OPCODE_X1 = 12,
|
||||
LH_U_OPCODE_Y2 = 3,
|
||||
LH_U_UN_0_SHUN_0_OPCODE_X1 = 13,
|
||||
LNK_SPECIAL_0_OPCODE_X1 = 13,
|
||||
LWADD_IMM_0_OPCODE_X1 = 26,
|
||||
LWADD_NA_IMM_0_OPCODE_X1 = 27,
|
||||
LW_NA_UN_0_SHUN_0_OPCODE_X1 = 24,
|
||||
LW_OPCODE_Y2 = 4,
|
||||
LW_UN_0_SHUN_0_OPCODE_X1 = 14,
|
||||
MAXB_U_SPECIAL_0_OPCODE_X0 = 15,
|
||||
MAXB_U_SPECIAL_0_OPCODE_X1 = 14,
|
||||
MAXH_SPECIAL_0_OPCODE_X0 = 16,
|
||||
MAXH_SPECIAL_0_OPCODE_X1 = 15,
|
||||
MAXIB_U_IMM_0_OPCODE_X0 = 4,
|
||||
MAXIB_U_IMM_0_OPCODE_X1 = 5,
|
||||
MAXIH_IMM_0_OPCODE_X0 = 5,
|
||||
MAXIH_IMM_0_OPCODE_X1 = 6,
|
||||
MFSPR_IMM_0_OPCODE_X1 = 7,
|
||||
MF_UN_0_SHUN_0_OPCODE_X1 = 15,
|
||||
MINB_U_SPECIAL_0_OPCODE_X0 = 17,
|
||||
MINB_U_SPECIAL_0_OPCODE_X1 = 16,
|
||||
MINH_SPECIAL_0_OPCODE_X0 = 18,
|
||||
MINH_SPECIAL_0_OPCODE_X1 = 17,
|
||||
MINIB_U_IMM_0_OPCODE_X0 = 6,
|
||||
MINIB_U_IMM_0_OPCODE_X1 = 8,
|
||||
MINIH_IMM_0_OPCODE_X0 = 7,
|
||||
MINIH_IMM_0_OPCODE_X1 = 9,
|
||||
MM_OPCODE_X0 = 6,
|
||||
MM_OPCODE_X1 = 7,
|
||||
MNZB_SPECIAL_0_OPCODE_X0 = 19,
|
||||
MNZB_SPECIAL_0_OPCODE_X1 = 18,
|
||||
MNZH_SPECIAL_0_OPCODE_X0 = 20,
|
||||
MNZH_SPECIAL_0_OPCODE_X1 = 19,
|
||||
MNZ_SPECIAL_0_OPCODE_X0 = 21,
|
||||
MNZ_SPECIAL_0_OPCODE_X1 = 20,
|
||||
MNZ_SPECIAL_1_OPCODE_Y0 = 0,
|
||||
MNZ_SPECIAL_1_OPCODE_Y1 = 1,
|
||||
MOVEI_IMM_1_OPCODE_SN = 0,
|
||||
MOVE_RR_IMM_0_OPCODE_SN = 8,
|
||||
MTSPR_IMM_0_OPCODE_X1 = 10,
|
||||
MULHHA_SS_SPECIAL_0_OPCODE_X0 = 22,
|
||||
MULHHA_SS_SPECIAL_7_OPCODE_Y0 = 0,
|
||||
MULHHA_SU_SPECIAL_0_OPCODE_X0 = 23,
|
||||
MULHHA_UU_SPECIAL_0_OPCODE_X0 = 24,
|
||||
MULHHA_UU_SPECIAL_7_OPCODE_Y0 = 1,
|
||||
MULHHSA_UU_SPECIAL_0_OPCODE_X0 = 25,
|
||||
MULHH_SS_SPECIAL_0_OPCODE_X0 = 26,
|
||||
MULHH_SS_SPECIAL_6_OPCODE_Y0 = 0,
|
||||
MULHH_SU_SPECIAL_0_OPCODE_X0 = 27,
|
||||
MULHH_UU_SPECIAL_0_OPCODE_X0 = 28,
|
||||
MULHH_UU_SPECIAL_6_OPCODE_Y0 = 1,
|
||||
MULHLA_SS_SPECIAL_0_OPCODE_X0 = 29,
|
||||
MULHLA_SU_SPECIAL_0_OPCODE_X0 = 30,
|
||||
MULHLA_US_SPECIAL_0_OPCODE_X0 = 31,
|
||||
MULHLA_UU_SPECIAL_0_OPCODE_X0 = 32,
|
||||
MULHLSA_UU_SPECIAL_0_OPCODE_X0 = 33,
|
||||
MULHLSA_UU_SPECIAL_5_OPCODE_Y0 = 0,
|
||||
MULHL_SS_SPECIAL_0_OPCODE_X0 = 34,
|
||||
MULHL_SU_SPECIAL_0_OPCODE_X0 = 35,
|
||||
MULHL_US_SPECIAL_0_OPCODE_X0 = 36,
|
||||
MULHL_UU_SPECIAL_0_OPCODE_X0 = 37,
|
||||
MULLLA_SS_SPECIAL_0_OPCODE_X0 = 38,
|
||||
MULLLA_SS_SPECIAL_7_OPCODE_Y0 = 2,
|
||||
MULLLA_SU_SPECIAL_0_OPCODE_X0 = 39,
|
||||
MULLLA_UU_SPECIAL_0_OPCODE_X0 = 40,
|
||||
MULLLA_UU_SPECIAL_7_OPCODE_Y0 = 3,
|
||||
MULLLSA_UU_SPECIAL_0_OPCODE_X0 = 41,
|
||||
MULLL_SS_SPECIAL_0_OPCODE_X0 = 42,
|
||||
MULLL_SS_SPECIAL_6_OPCODE_Y0 = 2,
|
||||
MULLL_SU_SPECIAL_0_OPCODE_X0 = 43,
|
||||
MULLL_UU_SPECIAL_0_OPCODE_X0 = 44,
|
||||
MULLL_UU_SPECIAL_6_OPCODE_Y0 = 3,
|
||||
MVNZ_SPECIAL_0_OPCODE_X0 = 45,
|
||||
MVNZ_SPECIAL_1_OPCODE_Y0 = 1,
|
||||
MVZ_SPECIAL_0_OPCODE_X0 = 46,
|
||||
MVZ_SPECIAL_1_OPCODE_Y0 = 2,
|
||||
MZB_SPECIAL_0_OPCODE_X0 = 47,
|
||||
MZB_SPECIAL_0_OPCODE_X1 = 21,
|
||||
MZH_SPECIAL_0_OPCODE_X0 = 48,
|
||||
MZH_SPECIAL_0_OPCODE_X1 = 22,
|
||||
MZ_SPECIAL_0_OPCODE_X0 = 49,
|
||||
MZ_SPECIAL_0_OPCODE_X1 = 23,
|
||||
MZ_SPECIAL_1_OPCODE_Y0 = 3,
|
||||
MZ_SPECIAL_1_OPCODE_Y1 = 2,
|
||||
NAP_UN_0_SHUN_0_OPCODE_X1 = 16,
|
||||
NOP_NOREG_RR_IMM_0_OPCODE_SN = 2,
|
||||
NOP_UN_0_SHUN_0_OPCODE_X0 = 6,
|
||||
NOP_UN_0_SHUN_0_OPCODE_X1 = 17,
|
||||
NOP_UN_0_SHUN_0_OPCODE_Y0 = 6,
|
||||
NOP_UN_0_SHUN_0_OPCODE_Y1 = 3,
|
||||
NOREG_RR_IMM_0_OPCODE_SN = 0,
|
||||
NOR_SPECIAL_0_OPCODE_X0 = 50,
|
||||
NOR_SPECIAL_0_OPCODE_X1 = 24,
|
||||
NOR_SPECIAL_2_OPCODE_Y0 = 1,
|
||||
NOR_SPECIAL_2_OPCODE_Y1 = 1,
|
||||
ORI_IMM_0_OPCODE_X0 = 8,
|
||||
ORI_IMM_0_OPCODE_X1 = 11,
|
||||
ORI_OPCODE_Y0 = 11,
|
||||
ORI_OPCODE_Y1 = 9,
|
||||
OR_SPECIAL_0_OPCODE_X0 = 51,
|
||||
OR_SPECIAL_0_OPCODE_X1 = 25,
|
||||
OR_SPECIAL_2_OPCODE_Y0 = 2,
|
||||
OR_SPECIAL_2_OPCODE_Y1 = 2,
|
||||
PACKBS_U_SPECIAL_0_OPCODE_X0 = 103,
|
||||
PACKBS_U_SPECIAL_0_OPCODE_X1 = 73,
|
||||
PACKHB_SPECIAL_0_OPCODE_X0 = 52,
|
||||
PACKHB_SPECIAL_0_OPCODE_X1 = 26,
|
||||
PACKHS_SPECIAL_0_OPCODE_X0 = 102,
|
||||
PACKHS_SPECIAL_0_OPCODE_X1 = 72,
|
||||
PACKLB_SPECIAL_0_OPCODE_X0 = 53,
|
||||
PACKLB_SPECIAL_0_OPCODE_X1 = 27,
|
||||
PCNT_UN_0_SHUN_0_OPCODE_X0 = 7,
|
||||
PCNT_UN_0_SHUN_0_OPCODE_Y0 = 7,
|
||||
RLI_SHUN_0_OPCODE_X0 = 1,
|
||||
RLI_SHUN_0_OPCODE_X1 = 1,
|
||||
RLI_SHUN_0_OPCODE_Y0 = 1,
|
||||
RLI_SHUN_0_OPCODE_Y1 = 1,
|
||||
RL_SPECIAL_0_OPCODE_X0 = 54,
|
||||
RL_SPECIAL_0_OPCODE_X1 = 28,
|
||||
RL_SPECIAL_3_OPCODE_Y0 = 0,
|
||||
RL_SPECIAL_3_OPCODE_Y1 = 0,
|
||||
RR_IMM_0_OPCODE_SN = 0,
|
||||
S1A_SPECIAL_0_OPCODE_X0 = 55,
|
||||
S1A_SPECIAL_0_OPCODE_X1 = 29,
|
||||
S1A_SPECIAL_0_OPCODE_Y0 = 1,
|
||||
S1A_SPECIAL_0_OPCODE_Y1 = 1,
|
||||
S2A_SPECIAL_0_OPCODE_X0 = 56,
|
||||
S2A_SPECIAL_0_OPCODE_X1 = 30,
|
||||
S2A_SPECIAL_0_OPCODE_Y0 = 2,
|
||||
S2A_SPECIAL_0_OPCODE_Y1 = 2,
|
||||
S3A_SPECIAL_0_OPCODE_X0 = 57,
|
||||
S3A_SPECIAL_0_OPCODE_X1 = 31,
|
||||
S3A_SPECIAL_5_OPCODE_Y0 = 1,
|
||||
S3A_SPECIAL_5_OPCODE_Y1 = 1,
|
||||
SADAB_U_SPECIAL_0_OPCODE_X0 = 58,
|
||||
SADAH_SPECIAL_0_OPCODE_X0 = 59,
|
||||
SADAH_U_SPECIAL_0_OPCODE_X0 = 60,
|
||||
SADB_U_SPECIAL_0_OPCODE_X0 = 61,
|
||||
SADH_SPECIAL_0_OPCODE_X0 = 62,
|
||||
SADH_U_SPECIAL_0_OPCODE_X0 = 63,
|
||||
SBADD_IMM_0_OPCODE_X1 = 28,
|
||||
SB_OPCODE_Y2 = 5,
|
||||
SB_SPECIAL_0_OPCODE_X1 = 32,
|
||||
SEQB_SPECIAL_0_OPCODE_X0 = 64,
|
||||
SEQB_SPECIAL_0_OPCODE_X1 = 33,
|
||||
SEQH_SPECIAL_0_OPCODE_X0 = 65,
|
||||
SEQH_SPECIAL_0_OPCODE_X1 = 34,
|
||||
SEQIB_IMM_0_OPCODE_X0 = 9,
|
||||
SEQIB_IMM_0_OPCODE_X1 = 12,
|
||||
SEQIH_IMM_0_OPCODE_X0 = 10,
|
||||
SEQIH_IMM_0_OPCODE_X1 = 13,
|
||||
SEQI_IMM_0_OPCODE_X0 = 11,
|
||||
SEQI_IMM_0_OPCODE_X1 = 14,
|
||||
SEQI_OPCODE_Y0 = 12,
|
||||
SEQI_OPCODE_Y1 = 10,
|
||||
SEQ_SPECIAL_0_OPCODE_X0 = 66,
|
||||
SEQ_SPECIAL_0_OPCODE_X1 = 35,
|
||||
SEQ_SPECIAL_5_OPCODE_Y0 = 2,
|
||||
SEQ_SPECIAL_5_OPCODE_Y1 = 2,
|
||||
SHADD_IMM_0_OPCODE_X1 = 29,
|
||||
SHL8II_IMM_0_OPCODE_SN = 3,
|
||||
SHLB_SPECIAL_0_OPCODE_X0 = 67,
|
||||
SHLB_SPECIAL_0_OPCODE_X1 = 36,
|
||||
SHLH_SPECIAL_0_OPCODE_X0 = 68,
|
||||
SHLH_SPECIAL_0_OPCODE_X1 = 37,
|
||||
SHLIB_SHUN_0_OPCODE_X0 = 2,
|
||||
SHLIB_SHUN_0_OPCODE_X1 = 2,
|
||||
SHLIH_SHUN_0_OPCODE_X0 = 3,
|
||||
SHLIH_SHUN_0_OPCODE_X1 = 3,
|
||||
SHLI_SHUN_0_OPCODE_X0 = 4,
|
||||
SHLI_SHUN_0_OPCODE_X1 = 4,
|
||||
SHLI_SHUN_0_OPCODE_Y0 = 2,
|
||||
SHLI_SHUN_0_OPCODE_Y1 = 2,
|
||||
SHL_SPECIAL_0_OPCODE_X0 = 69,
|
||||
SHL_SPECIAL_0_OPCODE_X1 = 38,
|
||||
SHL_SPECIAL_3_OPCODE_Y0 = 1,
|
||||
SHL_SPECIAL_3_OPCODE_Y1 = 1,
|
||||
SHR1_RR_IMM_0_OPCODE_SN = 9,
|
||||
SHRB_SPECIAL_0_OPCODE_X0 = 70,
|
||||
SHRB_SPECIAL_0_OPCODE_X1 = 39,
|
||||
SHRH_SPECIAL_0_OPCODE_X0 = 71,
|
||||
SHRH_SPECIAL_0_OPCODE_X1 = 40,
|
||||
SHRIB_SHUN_0_OPCODE_X0 = 5,
|
||||
SHRIB_SHUN_0_OPCODE_X1 = 5,
|
||||
SHRIH_SHUN_0_OPCODE_X0 = 6,
|
||||
SHRIH_SHUN_0_OPCODE_X1 = 6,
|
||||
SHRI_SHUN_0_OPCODE_X0 = 7,
|
||||
SHRI_SHUN_0_OPCODE_X1 = 7,
|
||||
SHRI_SHUN_0_OPCODE_Y0 = 3,
|
||||
SHRI_SHUN_0_OPCODE_Y1 = 3,
|
||||
SHR_SPECIAL_0_OPCODE_X0 = 72,
|
||||
SHR_SPECIAL_0_OPCODE_X1 = 41,
|
||||
SHR_SPECIAL_3_OPCODE_Y0 = 2,
|
||||
SHR_SPECIAL_3_OPCODE_Y1 = 2,
|
||||
SHUN_0_OPCODE_X0 = 7,
|
||||
SHUN_0_OPCODE_X1 = 8,
|
||||
SHUN_0_OPCODE_Y0 = 13,
|
||||
SHUN_0_OPCODE_Y1 = 11,
|
||||
SH_OPCODE_Y2 = 6,
|
||||
SH_SPECIAL_0_OPCODE_X1 = 42,
|
||||
SLTB_SPECIAL_0_OPCODE_X0 = 73,
|
||||
SLTB_SPECIAL_0_OPCODE_X1 = 43,
|
||||
SLTB_U_SPECIAL_0_OPCODE_X0 = 74,
|
||||
SLTB_U_SPECIAL_0_OPCODE_X1 = 44,
|
||||
SLTEB_SPECIAL_0_OPCODE_X0 = 75,
|
||||
SLTEB_SPECIAL_0_OPCODE_X1 = 45,
|
||||
SLTEB_U_SPECIAL_0_OPCODE_X0 = 76,
|
||||
SLTEB_U_SPECIAL_0_OPCODE_X1 = 46,
|
||||
SLTEH_SPECIAL_0_OPCODE_X0 = 77,
|
||||
SLTEH_SPECIAL_0_OPCODE_X1 = 47,
|
||||
SLTEH_U_SPECIAL_0_OPCODE_X0 = 78,
|
||||
SLTEH_U_SPECIAL_0_OPCODE_X1 = 48,
|
||||
SLTE_SPECIAL_0_OPCODE_X0 = 79,
|
||||
SLTE_SPECIAL_0_OPCODE_X1 = 49,
|
||||
SLTE_SPECIAL_4_OPCODE_Y0 = 0,
|
||||
SLTE_SPECIAL_4_OPCODE_Y1 = 0,
|
||||
SLTE_U_SPECIAL_0_OPCODE_X0 = 80,
|
||||
SLTE_U_SPECIAL_0_OPCODE_X1 = 50,
|
||||
SLTE_U_SPECIAL_4_OPCODE_Y0 = 1,
|
||||
SLTE_U_SPECIAL_4_OPCODE_Y1 = 1,
|
||||
SLTH_SPECIAL_0_OPCODE_X0 = 81,
|
||||
SLTH_SPECIAL_0_OPCODE_X1 = 51,
|
||||
SLTH_U_SPECIAL_0_OPCODE_X0 = 82,
|
||||
SLTH_U_SPECIAL_0_OPCODE_X1 = 52,
|
||||
SLTIB_IMM_0_OPCODE_X0 = 12,
|
||||
SLTIB_IMM_0_OPCODE_X1 = 15,
|
||||
SLTIB_U_IMM_0_OPCODE_X0 = 13,
|
||||
SLTIB_U_IMM_0_OPCODE_X1 = 16,
|
||||
SLTIH_IMM_0_OPCODE_X0 = 14,
|
||||
SLTIH_IMM_0_OPCODE_X1 = 17,
|
||||
SLTIH_U_IMM_0_OPCODE_X0 = 15,
|
||||
SLTIH_U_IMM_0_OPCODE_X1 = 18,
|
||||
SLTI_IMM_0_OPCODE_X0 = 16,
|
||||
SLTI_IMM_0_OPCODE_X1 = 19,
|
||||
SLTI_OPCODE_Y0 = 14,
|
||||
SLTI_OPCODE_Y1 = 12,
|
||||
SLTI_U_IMM_0_OPCODE_X0 = 17,
|
||||
SLTI_U_IMM_0_OPCODE_X1 = 20,
|
||||
SLTI_U_OPCODE_Y0 = 15,
|
||||
SLTI_U_OPCODE_Y1 = 13,
|
||||
SLT_SPECIAL_0_OPCODE_X0 = 83,
|
||||
SLT_SPECIAL_0_OPCODE_X1 = 53,
|
||||
SLT_SPECIAL_4_OPCODE_Y0 = 2,
|
||||
SLT_SPECIAL_4_OPCODE_Y1 = 2,
|
||||
SLT_U_SPECIAL_0_OPCODE_X0 = 84,
|
||||
SLT_U_SPECIAL_0_OPCODE_X1 = 54,
|
||||
SLT_U_SPECIAL_4_OPCODE_Y0 = 3,
|
||||
SLT_U_SPECIAL_4_OPCODE_Y1 = 3,
|
||||
SNEB_SPECIAL_0_OPCODE_X0 = 85,
|
||||
SNEB_SPECIAL_0_OPCODE_X1 = 55,
|
||||
SNEH_SPECIAL_0_OPCODE_X0 = 86,
|
||||
SNEH_SPECIAL_0_OPCODE_X1 = 56,
|
||||
SNE_SPECIAL_0_OPCODE_X0 = 87,
|
||||
SNE_SPECIAL_0_OPCODE_X1 = 57,
|
||||
SNE_SPECIAL_5_OPCODE_Y0 = 3,
|
||||
SNE_SPECIAL_5_OPCODE_Y1 = 3,
|
||||
SPECIAL_0_OPCODE_X0 = 0,
|
||||
SPECIAL_0_OPCODE_X1 = 1,
|
||||
SPECIAL_0_OPCODE_Y0 = 1,
|
||||
SPECIAL_0_OPCODE_Y1 = 1,
|
||||
SPECIAL_1_OPCODE_Y0 = 2,
|
||||
SPECIAL_1_OPCODE_Y1 = 2,
|
||||
SPECIAL_2_OPCODE_Y0 = 3,
|
||||
SPECIAL_2_OPCODE_Y1 = 3,
|
||||
SPECIAL_3_OPCODE_Y0 = 4,
|
||||
SPECIAL_3_OPCODE_Y1 = 4,
|
||||
SPECIAL_4_OPCODE_Y0 = 5,
|
||||
SPECIAL_4_OPCODE_Y1 = 5,
|
||||
SPECIAL_5_OPCODE_Y0 = 6,
|
||||
SPECIAL_5_OPCODE_Y1 = 6,
|
||||
SPECIAL_6_OPCODE_Y0 = 7,
|
||||
SPECIAL_7_OPCODE_Y0 = 8,
|
||||
SRAB_SPECIAL_0_OPCODE_X0 = 88,
|
||||
SRAB_SPECIAL_0_OPCODE_X1 = 58,
|
||||
SRAH_SPECIAL_0_OPCODE_X0 = 89,
|
||||
SRAH_SPECIAL_0_OPCODE_X1 = 59,
|
||||
SRAIB_SHUN_0_OPCODE_X0 = 8,
|
||||
SRAIB_SHUN_0_OPCODE_X1 = 8,
|
||||
SRAIH_SHUN_0_OPCODE_X0 = 9,
|
||||
SRAIH_SHUN_0_OPCODE_X1 = 9,
|
||||
SRAI_SHUN_0_OPCODE_X0 = 10,
|
||||
SRAI_SHUN_0_OPCODE_X1 = 10,
|
||||
SRAI_SHUN_0_OPCODE_Y0 = 4,
|
||||
SRAI_SHUN_0_OPCODE_Y1 = 4,
|
||||
SRA_SPECIAL_0_OPCODE_X0 = 90,
|
||||
SRA_SPECIAL_0_OPCODE_X1 = 60,
|
||||
SRA_SPECIAL_3_OPCODE_Y0 = 3,
|
||||
SRA_SPECIAL_3_OPCODE_Y1 = 3,
|
||||
SUBBS_U_SPECIAL_0_OPCODE_X0 = 100,
|
||||
SUBBS_U_SPECIAL_0_OPCODE_X1 = 70,
|
||||
SUBB_SPECIAL_0_OPCODE_X0 = 91,
|
||||
SUBB_SPECIAL_0_OPCODE_X1 = 61,
|
||||
SUBHS_SPECIAL_0_OPCODE_X0 = 101,
|
||||
SUBHS_SPECIAL_0_OPCODE_X1 = 71,
|
||||
SUBH_SPECIAL_0_OPCODE_X0 = 92,
|
||||
SUBH_SPECIAL_0_OPCODE_X1 = 62,
|
||||
SUBS_SPECIAL_0_OPCODE_X0 = 97,
|
||||
SUBS_SPECIAL_0_OPCODE_X1 = 67,
|
||||
SUB_SPECIAL_0_OPCODE_X0 = 93,
|
||||
SUB_SPECIAL_0_OPCODE_X1 = 63,
|
||||
SUB_SPECIAL_0_OPCODE_Y0 = 3,
|
||||
SUB_SPECIAL_0_OPCODE_Y1 = 3,
|
||||
SWADD_IMM_0_OPCODE_X1 = 30,
|
||||
SWINT0_UN_0_SHUN_0_OPCODE_X1 = 18,
|
||||
SWINT1_UN_0_SHUN_0_OPCODE_X1 = 19,
|
||||
SWINT2_UN_0_SHUN_0_OPCODE_X1 = 20,
|
||||
SWINT3_UN_0_SHUN_0_OPCODE_X1 = 21,
|
||||
SW_OPCODE_Y2 = 7,
|
||||
SW_SPECIAL_0_OPCODE_X1 = 64,
|
||||
TBLIDXB0_UN_0_SHUN_0_OPCODE_X0 = 8,
|
||||
TBLIDXB0_UN_0_SHUN_0_OPCODE_Y0 = 8,
|
||||
TBLIDXB1_UN_0_SHUN_0_OPCODE_X0 = 9,
|
||||
TBLIDXB1_UN_0_SHUN_0_OPCODE_Y0 = 9,
|
||||
TBLIDXB2_UN_0_SHUN_0_OPCODE_X0 = 10,
|
||||
TBLIDXB2_UN_0_SHUN_0_OPCODE_Y0 = 10,
|
||||
TBLIDXB3_UN_0_SHUN_0_OPCODE_X0 = 11,
|
||||
TBLIDXB3_UN_0_SHUN_0_OPCODE_Y0 = 11,
|
||||
TNS_UN_0_SHUN_0_OPCODE_X1 = 22,
|
||||
UN_0_SHUN_0_OPCODE_X0 = 11,
|
||||
UN_0_SHUN_0_OPCODE_X1 = 11,
|
||||
UN_0_SHUN_0_OPCODE_Y0 = 5,
|
||||
UN_0_SHUN_0_OPCODE_Y1 = 5,
|
||||
WH64_UN_0_SHUN_0_OPCODE_X1 = 23,
|
||||
XORI_IMM_0_OPCODE_X0 = 2,
|
||||
XORI_IMM_0_OPCODE_X1 = 21,
|
||||
XOR_SPECIAL_0_OPCODE_X0 = 94,
|
||||
XOR_SPECIAL_0_OPCODE_X1 = 65,
|
||||
XOR_SPECIAL_2_OPCODE_Y0 = 3,
|
||||
XOR_SPECIAL_2_OPCODE_Y1 = 3
|
||||
};
|
||||
|
||||
#endif /* !_TILE_OPCODE_CONSTANTS_H */
|
@ -15,6 +15,8 @@
|
||||
#ifndef _ASM_TILE_SIGCONTEXT_H
|
||||
#define _ASM_TILE_SIGCONTEXT_H
|
||||
|
||||
/* Don't pollute the namespace since <signal.h> includes this file. */
|
||||
#define __need_int_reg_t
|
||||
#include <arch/abi.h>
|
||||
|
||||
/*
|
||||
@ -22,14 +24,14 @@
|
||||
* but is simplified since we know the fault is from userspace.
|
||||
*/
|
||||
struct sigcontext {
|
||||
uint_reg_t gregs[53]; /* General-purpose registers. */
|
||||
uint_reg_t tp; /* Aliases gregs[TREG_TP]. */
|
||||
uint_reg_t sp; /* Aliases gregs[TREG_SP]. */
|
||||
uint_reg_t lr; /* Aliases gregs[TREG_LR]. */
|
||||
uint_reg_t pc; /* Program counter. */
|
||||
uint_reg_t ics; /* In Interrupt Critical Section? */
|
||||
uint_reg_t faultnum; /* Fault number. */
|
||||
uint_reg_t pad[5];
|
||||
__uint_reg_t gregs[53]; /* General-purpose registers. */
|
||||
__uint_reg_t tp; /* Aliases gregs[TREG_TP]. */
|
||||
__uint_reg_t sp; /* Aliases gregs[TREG_SP]. */
|
||||
__uint_reg_t lr; /* Aliases gregs[TREG_LR]. */
|
||||
__uint_reg_t pc; /* Program counter. */
|
||||
__uint_reg_t ics; /* In Interrupt Critical Section? */
|
||||
__uint_reg_t faultnum; /* Fault number. */
|
||||
__uint_reg_t pad[5];
|
||||
};
|
||||
|
||||
#endif /* _ASM_TILE_SIGCONTEXT_H */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010 Tilera Corporation. All Rights Reserved.
|
||||
* Copyright 2011 Tilera Corporation. All Rights Reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -12,19 +12,8 @@
|
||||
* more details.
|
||||
*/
|
||||
|
||||
#ifndef _ASM_TILE_OPCODE_TILE_H
|
||||
#define _ASM_TILE_OPCODE_TILE_H
|
||||
|
||||
#include <arch/chip.h>
|
||||
|
||||
#if CHIP_WORD_SIZE() == 64
|
||||
#include <asm/opcode-tile_64.h>
|
||||
#ifndef __tilegx__
|
||||
#include <asm/tile-desc_32.h>
|
||||
#else
|
||||
#include <asm/opcode-tile_32.h>
|
||||
#include <asm/tile-desc_64.h>
|
||||
#endif
|
||||
|
||||
/* These definitions are not correct for TILE64, so just avoid them. */
|
||||
#undef TILE_ELF_MACHINE_CODE
|
||||
#undef TILE_ELF_NAME
|
||||
|
||||
#endif /* _ASM_TILE_OPCODE_TILE_H */
|
553
arch/tile/include/asm/tile-desc_32.h
Normal file
553
arch/tile/include/asm/tile-desc_32.h
Normal file
@ -0,0 +1,553 @@
|
||||
/* TILEPro opcode information.
|
||||
*
|
||||
* Copyright 2011 Tilera Corporation. All Rights Reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation, version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
|
||||
* NON INFRINGEMENT. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef opcode_tilepro_h
|
||||
#define opcode_tilepro_h
|
||||
|
||||
#include <arch/opcode.h>
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
TILEPRO_MAX_OPERANDS = 5 /* mm */
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TILEPRO_OPC_BPT,
|
||||
TILEPRO_OPC_INFO,
|
||||
TILEPRO_OPC_INFOL,
|
||||
TILEPRO_OPC_J,
|
||||
TILEPRO_OPC_JAL,
|
||||
TILEPRO_OPC_MOVE,
|
||||
TILEPRO_OPC_MOVE_SN,
|
||||
TILEPRO_OPC_MOVEI,
|
||||
TILEPRO_OPC_MOVEI_SN,
|
||||
TILEPRO_OPC_MOVELI,
|
||||
TILEPRO_OPC_MOVELI_SN,
|
||||
TILEPRO_OPC_MOVELIS,
|
||||
TILEPRO_OPC_PREFETCH,
|
||||
TILEPRO_OPC_RAISE,
|
||||
TILEPRO_OPC_ADD,
|
||||
TILEPRO_OPC_ADD_SN,
|
||||
TILEPRO_OPC_ADDB,
|
||||
TILEPRO_OPC_ADDB_SN,
|
||||
TILEPRO_OPC_ADDBS_U,
|
||||
TILEPRO_OPC_ADDBS_U_SN,
|
||||
TILEPRO_OPC_ADDH,
|
||||
TILEPRO_OPC_ADDH_SN,
|
||||
TILEPRO_OPC_ADDHS,
|
||||
TILEPRO_OPC_ADDHS_SN,
|
||||
TILEPRO_OPC_ADDI,
|
||||
TILEPRO_OPC_ADDI_SN,
|
||||
TILEPRO_OPC_ADDIB,
|
||||
TILEPRO_OPC_ADDIB_SN,
|
||||
TILEPRO_OPC_ADDIH,
|
||||
TILEPRO_OPC_ADDIH_SN,
|
||||
TILEPRO_OPC_ADDLI,
|
||||
TILEPRO_OPC_ADDLI_SN,
|
||||
TILEPRO_OPC_ADDLIS,
|
||||
TILEPRO_OPC_ADDS,
|
||||
TILEPRO_OPC_ADDS_SN,
|
||||
TILEPRO_OPC_ADIFFB_U,
|
||||
TILEPRO_OPC_ADIFFB_U_SN,
|
||||
TILEPRO_OPC_ADIFFH,
|
||||
TILEPRO_OPC_ADIFFH_SN,
|
||||
TILEPRO_OPC_AND,
|
||||
TILEPRO_OPC_AND_SN,
|
||||
TILEPRO_OPC_ANDI,
|
||||
TILEPRO_OPC_ANDI_SN,
|
||||
TILEPRO_OPC_AULI,
|
||||
TILEPRO_OPC_AVGB_U,
|
||||
TILEPRO_OPC_AVGB_U_SN,
|
||||
TILEPRO_OPC_AVGH,
|
||||
TILEPRO_OPC_AVGH_SN,
|
||||
TILEPRO_OPC_BBNS,
|
||||
TILEPRO_OPC_BBNS_SN,
|
||||
TILEPRO_OPC_BBNST,
|
||||
TILEPRO_OPC_BBNST_SN,
|
||||
TILEPRO_OPC_BBS,
|
||||
TILEPRO_OPC_BBS_SN,
|
||||
TILEPRO_OPC_BBST,
|
||||
TILEPRO_OPC_BBST_SN,
|
||||
TILEPRO_OPC_BGEZ,
|
||||
TILEPRO_OPC_BGEZ_SN,
|
||||
TILEPRO_OPC_BGEZT,
|
||||
TILEPRO_OPC_BGEZT_SN,
|
||||
TILEPRO_OPC_BGZ,
|
||||
TILEPRO_OPC_BGZ_SN,
|
||||
TILEPRO_OPC_BGZT,
|
||||
TILEPRO_OPC_BGZT_SN,
|
||||
TILEPRO_OPC_BITX,
|
||||
TILEPRO_OPC_BITX_SN,
|
||||
TILEPRO_OPC_BLEZ,
|
||||
TILEPRO_OPC_BLEZ_SN,
|
||||
TILEPRO_OPC_BLEZT,
|
||||
TILEPRO_OPC_BLEZT_SN,
|
||||
TILEPRO_OPC_BLZ,
|
||||
TILEPRO_OPC_BLZ_SN,
|
||||
TILEPRO_OPC_BLZT,
|
||||
TILEPRO_OPC_BLZT_SN,
|
||||
TILEPRO_OPC_BNZ,
|
||||
TILEPRO_OPC_BNZ_SN,
|
||||
TILEPRO_OPC_BNZT,
|
||||
TILEPRO_OPC_BNZT_SN,
|
||||
TILEPRO_OPC_BYTEX,
|
||||
TILEPRO_OPC_BYTEX_SN,
|
||||
TILEPRO_OPC_BZ,
|
||||
TILEPRO_OPC_BZ_SN,
|
||||
TILEPRO_OPC_BZT,
|
||||
TILEPRO_OPC_BZT_SN,
|
||||
TILEPRO_OPC_CLZ,
|
||||
TILEPRO_OPC_CLZ_SN,
|
||||
TILEPRO_OPC_CRC32_32,
|
||||
TILEPRO_OPC_CRC32_32_SN,
|
||||
TILEPRO_OPC_CRC32_8,
|
||||
TILEPRO_OPC_CRC32_8_SN,
|
||||
TILEPRO_OPC_CTZ,
|
||||
TILEPRO_OPC_CTZ_SN,
|
||||
TILEPRO_OPC_DRAIN,
|
||||
TILEPRO_OPC_DTLBPR,
|
||||
TILEPRO_OPC_DWORD_ALIGN,
|
||||
TILEPRO_OPC_DWORD_ALIGN_SN,
|
||||
TILEPRO_OPC_FINV,
|
||||
TILEPRO_OPC_FLUSH,
|
||||
TILEPRO_OPC_FNOP,
|
||||
TILEPRO_OPC_ICOH,
|
||||
TILEPRO_OPC_ILL,
|
||||
TILEPRO_OPC_INTHB,
|
||||
TILEPRO_OPC_INTHB_SN,
|
||||
TILEPRO_OPC_INTHH,
|
||||
TILEPRO_OPC_INTHH_SN,
|
||||
TILEPRO_OPC_INTLB,
|
||||
TILEPRO_OPC_INTLB_SN,
|
||||
TILEPRO_OPC_INTLH,
|
||||
TILEPRO_OPC_INTLH_SN,
|
||||
TILEPRO_OPC_INV,
|
||||
TILEPRO_OPC_IRET,
|
||||
TILEPRO_OPC_JALB,
|
||||
TILEPRO_OPC_JALF,
|
||||
TILEPRO_OPC_JALR,
|
||||
TILEPRO_OPC_JALRP,
|
||||
TILEPRO_OPC_JB,
|
||||
TILEPRO_OPC_JF,
|
||||
TILEPRO_OPC_JR,
|
||||
TILEPRO_OPC_JRP,
|
||||
TILEPRO_OPC_LB,
|
||||
TILEPRO_OPC_LB_SN,
|
||||
TILEPRO_OPC_LB_U,
|
||||
TILEPRO_OPC_LB_U_SN,
|
||||
TILEPRO_OPC_LBADD,
|
||||
TILEPRO_OPC_LBADD_SN,
|
||||
TILEPRO_OPC_LBADD_U,
|
||||
TILEPRO_OPC_LBADD_U_SN,
|
||||
TILEPRO_OPC_LH,
|
||||
TILEPRO_OPC_LH_SN,
|
||||
TILEPRO_OPC_LH_U,
|
||||
TILEPRO_OPC_LH_U_SN,
|
||||
TILEPRO_OPC_LHADD,
|
||||
TILEPRO_OPC_LHADD_SN,
|
||||
TILEPRO_OPC_LHADD_U,
|
||||
TILEPRO_OPC_LHADD_U_SN,
|
||||
TILEPRO_OPC_LNK,
|
||||
TILEPRO_OPC_LNK_SN,
|
||||
TILEPRO_OPC_LW,
|
||||
TILEPRO_OPC_LW_SN,
|
||||
TILEPRO_OPC_LW_NA,
|
||||
TILEPRO_OPC_LW_NA_SN,
|
||||
TILEPRO_OPC_LWADD,
|
||||
TILEPRO_OPC_LWADD_SN,
|
||||
TILEPRO_OPC_LWADD_NA,
|
||||
TILEPRO_OPC_LWADD_NA_SN,
|
||||
TILEPRO_OPC_MAXB_U,
|
||||
TILEPRO_OPC_MAXB_U_SN,
|
||||
TILEPRO_OPC_MAXH,
|
||||
TILEPRO_OPC_MAXH_SN,
|
||||
TILEPRO_OPC_MAXIB_U,
|
||||
TILEPRO_OPC_MAXIB_U_SN,
|
||||
TILEPRO_OPC_MAXIH,
|
||||
TILEPRO_OPC_MAXIH_SN,
|
||||
TILEPRO_OPC_MF,
|
||||
TILEPRO_OPC_MFSPR,
|
||||
TILEPRO_OPC_MINB_U,
|
||||
TILEPRO_OPC_MINB_U_SN,
|
||||
TILEPRO_OPC_MINH,
|
||||
TILEPRO_OPC_MINH_SN,
|
||||
TILEPRO_OPC_MINIB_U,
|
||||
TILEPRO_OPC_MINIB_U_SN,
|
||||
TILEPRO_OPC_MINIH,
|
||||
TILEPRO_OPC_MINIH_SN,
|
||||
TILEPRO_OPC_MM,
|
||||
TILEPRO_OPC_MNZ,
|
||||
TILEPRO_OPC_MNZ_SN,
|
||||
TILEPRO_OPC_MNZB,
|
||||
TILEPRO_OPC_MNZB_SN,
|
||||
TILEPRO_OPC_MNZH,
|
||||
TILEPRO_OPC_MNZH_SN,
|
||||
TILEPRO_OPC_MTSPR,
|
||||
TILEPRO_OPC_MULHH_SS,
|
||||
TILEPRO_OPC_MULHH_SS_SN,
|
||||
TILEPRO_OPC_MULHH_SU,
|
||||
TILEPRO_OPC_MULHH_SU_SN,
|
||||
TILEPRO_OPC_MULHH_UU,
|
||||
TILEPRO_OPC_MULHH_UU_SN,
|
||||
TILEPRO_OPC_MULHHA_SS,
|
||||
TILEPRO_OPC_MULHHA_SS_SN,
|
||||
TILEPRO_OPC_MULHHA_SU,
|
||||
TILEPRO_OPC_MULHHA_SU_SN,
|
||||
TILEPRO_OPC_MULHHA_UU,
|
||||
TILEPRO_OPC_MULHHA_UU_SN,
|
||||
TILEPRO_OPC_MULHHSA_UU,
|
||||
TILEPRO_OPC_MULHHSA_UU_SN,
|
||||
TILEPRO_OPC_MULHL_SS,
|
||||
TILEPRO_OPC_MULHL_SS_SN,
|
||||
TILEPRO_OPC_MULHL_SU,
|
||||
TILEPRO_OPC_MULHL_SU_SN,
|
||||
TILEPRO_OPC_MULHL_US,
|
||||
TILEPRO_OPC_MULHL_US_SN,
|
||||
TILEPRO_OPC_MULHL_UU,
|
||||
TILEPRO_OPC_MULHL_UU_SN,
|
||||
TILEPRO_OPC_MULHLA_SS,
|
||||
TILEPRO_OPC_MULHLA_SS_SN,
|
||||
TILEPRO_OPC_MULHLA_SU,
|
||||
TILEPRO_OPC_MULHLA_SU_SN,
|
||||
TILEPRO_OPC_MULHLA_US,
|
||||
TILEPRO_OPC_MULHLA_US_SN,
|
||||
TILEPRO_OPC_MULHLA_UU,
|
||||
TILEPRO_OPC_MULHLA_UU_SN,
|
||||
TILEPRO_OPC_MULHLSA_UU,
|
||||
TILEPRO_OPC_MULHLSA_UU_SN,
|
||||
TILEPRO_OPC_MULLL_SS,
|
||||
TILEPRO_OPC_MULLL_SS_SN,
|
||||
TILEPRO_OPC_MULLL_SU,
|
||||
TILEPRO_OPC_MULLL_SU_SN,
|
||||
TILEPRO_OPC_MULLL_UU,
|
||||
TILEPRO_OPC_MULLL_UU_SN,
|
||||
TILEPRO_OPC_MULLLA_SS,
|
||||
TILEPRO_OPC_MULLLA_SS_SN,
|
||||
TILEPRO_OPC_MULLLA_SU,
|
||||
TILEPRO_OPC_MULLLA_SU_SN,
|
||||
TILEPRO_OPC_MULLLA_UU,
|
||||
TILEPRO_OPC_MULLLA_UU_SN,
|
||||
TILEPRO_OPC_MULLLSA_UU,
|
||||
TILEPRO_OPC_MULLLSA_UU_SN,
|
||||
TILEPRO_OPC_MVNZ,
|
||||
TILEPRO_OPC_MVNZ_SN,
|
||||
TILEPRO_OPC_MVZ,
|
||||
TILEPRO_OPC_MVZ_SN,
|
||||
TILEPRO_OPC_MZ,
|
||||
TILEPRO_OPC_MZ_SN,
|
||||
TILEPRO_OPC_MZB,
|
||||
TILEPRO_OPC_MZB_SN,
|
||||
TILEPRO_OPC_MZH,
|
||||
TILEPRO_OPC_MZH_SN,
|
||||
TILEPRO_OPC_NAP,
|
||||
TILEPRO_OPC_NOP,
|
||||
TILEPRO_OPC_NOR,
|
||||
TILEPRO_OPC_NOR_SN,
|
||||
TILEPRO_OPC_OR,
|
||||
TILEPRO_OPC_OR_SN,
|
||||
TILEPRO_OPC_ORI,
|
||||
TILEPRO_OPC_ORI_SN,
|
||||
TILEPRO_OPC_PACKBS_U,
|
||||
TILEPRO_OPC_PACKBS_U_SN,
|
||||
TILEPRO_OPC_PACKHB,
|
||||
TILEPRO_OPC_PACKHB_SN,
|
||||
TILEPRO_OPC_PACKHS,
|
||||
TILEPRO_OPC_PACKHS_SN,
|
||||
TILEPRO_OPC_PACKLB,
|
||||
TILEPRO_OPC_PACKLB_SN,
|
||||
TILEPRO_OPC_PCNT,
|
||||
TILEPRO_OPC_PCNT_SN,
|
||||
TILEPRO_OPC_RL,
|
||||
TILEPRO_OPC_RL_SN,
|
||||
TILEPRO_OPC_RLI,
|
||||
TILEPRO_OPC_RLI_SN,
|
||||
TILEPRO_OPC_S1A,
|
||||
TILEPRO_OPC_S1A_SN,
|
||||
TILEPRO_OPC_S2A,
|
||||
TILEPRO_OPC_S2A_SN,
|
||||
TILEPRO_OPC_S3A,
|
||||
TILEPRO_OPC_S3A_SN,
|
||||
TILEPRO_OPC_SADAB_U,
|
||||
TILEPRO_OPC_SADAB_U_SN,
|
||||
TILEPRO_OPC_SADAH,
|
||||
TILEPRO_OPC_SADAH_SN,
|
||||
TILEPRO_OPC_SADAH_U,
|
||||
TILEPRO_OPC_SADAH_U_SN,
|
||||
TILEPRO_OPC_SADB_U,
|
||||
TILEPRO_OPC_SADB_U_SN,
|
||||
TILEPRO_OPC_SADH,
|
||||
TILEPRO_OPC_SADH_SN,
|
||||
TILEPRO_OPC_SADH_U,
|
||||
TILEPRO_OPC_SADH_U_SN,
|
||||
TILEPRO_OPC_SB,
|
||||
TILEPRO_OPC_SBADD,
|
||||
TILEPRO_OPC_SEQ,
|
||||
TILEPRO_OPC_SEQ_SN,
|
||||
TILEPRO_OPC_SEQB,
|
||||
TILEPRO_OPC_SEQB_SN,
|
||||
TILEPRO_OPC_SEQH,
|
||||
TILEPRO_OPC_SEQH_SN,
|
||||
TILEPRO_OPC_SEQI,
|
||||
TILEPRO_OPC_SEQI_SN,
|
||||
TILEPRO_OPC_SEQIB,
|
||||
TILEPRO_OPC_SEQIB_SN,
|
||||
TILEPRO_OPC_SEQIH,
|
||||
TILEPRO_OPC_SEQIH_SN,
|
||||
TILEPRO_OPC_SH,
|
||||
TILEPRO_OPC_SHADD,
|
||||
TILEPRO_OPC_SHL,
|
||||
TILEPRO_OPC_SHL_SN,
|
||||
TILEPRO_OPC_SHLB,
|
||||
TILEPRO_OPC_SHLB_SN,
|
||||
TILEPRO_OPC_SHLH,
|
||||
TILEPRO_OPC_SHLH_SN,
|
||||
TILEPRO_OPC_SHLI,
|
||||
TILEPRO_OPC_SHLI_SN,
|
||||
TILEPRO_OPC_SHLIB,
|
||||
TILEPRO_OPC_SHLIB_SN,
|
||||
TILEPRO_OPC_SHLIH,
|
||||
TILEPRO_OPC_SHLIH_SN,
|
||||
TILEPRO_OPC_SHR,
|
||||
TILEPRO_OPC_SHR_SN,
|
||||
TILEPRO_OPC_SHRB,
|
||||
TILEPRO_OPC_SHRB_SN,
|
||||
TILEPRO_OPC_SHRH,
|
||||
TILEPRO_OPC_SHRH_SN,
|
||||
TILEPRO_OPC_SHRI,
|
||||
TILEPRO_OPC_SHRI_SN,
|
||||
TILEPRO_OPC_SHRIB,
|
||||
TILEPRO_OPC_SHRIB_SN,
|
||||
TILEPRO_OPC_SHRIH,
|
||||
TILEPRO_OPC_SHRIH_SN,
|
||||
TILEPRO_OPC_SLT,
|
||||
TILEPRO_OPC_SLT_SN,
|
||||
TILEPRO_OPC_SLT_U,
|
||||
TILEPRO_OPC_SLT_U_SN,
|
||||
TILEPRO_OPC_SLTB,
|
||||
TILEPRO_OPC_SLTB_SN,
|
||||
TILEPRO_OPC_SLTB_U,
|
||||
TILEPRO_OPC_SLTB_U_SN,
|
||||
TILEPRO_OPC_SLTE,
|
||||
TILEPRO_OPC_SLTE_SN,
|
||||
TILEPRO_OPC_SLTE_U,
|
||||
TILEPRO_OPC_SLTE_U_SN,
|
||||
TILEPRO_OPC_SLTEB,
|
||||
TILEPRO_OPC_SLTEB_SN,
|
||||
TILEPRO_OPC_SLTEB_U,
|
||||
TILEPRO_OPC_SLTEB_U_SN,
|
||||
TILEPRO_OPC_SLTEH,
|
||||
TILEPRO_OPC_SLTEH_SN,
|
||||
TILEPRO_OPC_SLTEH_U,
|
||||
TILEPRO_OPC_SLTEH_U_SN,
|
||||
TILEPRO_OPC_SLTH,
|
||||
TILEPRO_OPC_SLTH_SN,
|
||||
TILEPRO_OPC_SLTH_U,
|
||||
TILEPRO_OPC_SLTH_U_SN,
|
||||
TILEPRO_OPC_SLTI,
|
||||
TILEPRO_OPC_SLTI_SN,
|
||||
TILEPRO_OPC_SLTI_U,
|
||||
TILEPRO_OPC_SLTI_U_SN,
|
||||
TILEPRO_OPC_SLTIB,
|
||||
TILEPRO_OPC_SLTIB_SN,
|
||||
TILEPRO_OPC_SLTIB_U,
|
||||
TILEPRO_OPC_SLTIB_U_SN,
|
||||
TILEPRO_OPC_SLTIH,
|
||||
TILEPRO_OPC_SLTIH_SN,
|
||||
TILEPRO_OPC_SLTIH_U,
|
||||
TILEPRO_OPC_SLTIH_U_SN,
|
||||
TILEPRO_OPC_SNE,
|
||||
TILEPRO_OPC_SNE_SN,
|
||||
TILEPRO_OPC_SNEB,
|
||||
TILEPRO_OPC_SNEB_SN,
|
||||
TILEPRO_OPC_SNEH,
|
||||
TILEPRO_OPC_SNEH_SN,
|
||||
TILEPRO_OPC_SRA,
|
||||
TILEPRO_OPC_SRA_SN,
|
||||
TILEPRO_OPC_SRAB,
|
||||
TILEPRO_OPC_SRAB_SN,
|
||||
TILEPRO_OPC_SRAH,
|
||||
TILEPRO_OPC_SRAH_SN,
|
||||
TILEPRO_OPC_SRAI,
|
||||
TILEPRO_OPC_SRAI_SN,
|
||||
TILEPRO_OPC_SRAIB,
|
||||
TILEPRO_OPC_SRAIB_SN,
|
||||
TILEPRO_OPC_SRAIH,
|
||||
TILEPRO_OPC_SRAIH_SN,
|
||||
TILEPRO_OPC_SUB,
|
||||
TILEPRO_OPC_SUB_SN,
|
||||
TILEPRO_OPC_SUBB,
|
||||
TILEPRO_OPC_SUBB_SN,
|
||||
TILEPRO_OPC_SUBBS_U,
|
||||
TILEPRO_OPC_SUBBS_U_SN,
|
||||
TILEPRO_OPC_SUBH,
|
||||
TILEPRO_OPC_SUBH_SN,
|
||||
TILEPRO_OPC_SUBHS,
|
||||
TILEPRO_OPC_SUBHS_SN,
|
||||
TILEPRO_OPC_SUBS,
|
||||
TILEPRO_OPC_SUBS_SN,
|
||||
TILEPRO_OPC_SW,
|
||||
TILEPRO_OPC_SWADD,
|
||||
TILEPRO_OPC_SWINT0,
|
||||
TILEPRO_OPC_SWINT1,
|
||||
TILEPRO_OPC_SWINT2,
|
||||
TILEPRO_OPC_SWINT3,
|
||||
TILEPRO_OPC_TBLIDXB0,
|
||||
TILEPRO_OPC_TBLIDXB0_SN,
|
||||
TILEPRO_OPC_TBLIDXB1,
|
||||
TILEPRO_OPC_TBLIDXB1_SN,
|
||||
TILEPRO_OPC_TBLIDXB2,
|
||||
TILEPRO_OPC_TBLIDXB2_SN,
|
||||
TILEPRO_OPC_TBLIDXB3,
|
||||
TILEPRO_OPC_TBLIDXB3_SN,
|
||||
TILEPRO_OPC_TNS,
|
||||
TILEPRO_OPC_TNS_SN,
|
||||
TILEPRO_OPC_WH64,
|
||||
TILEPRO_OPC_XOR,
|
||||
TILEPRO_OPC_XOR_SN,
|
||||
TILEPRO_OPC_XORI,
|
||||
TILEPRO_OPC_XORI_SN,
|
||||
TILEPRO_OPC_NONE
|
||||
} tilepro_mnemonic;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TILEPRO_PIPELINE_X0,
|
||||
TILEPRO_PIPELINE_X1,
|
||||
TILEPRO_PIPELINE_Y0,
|
||||
TILEPRO_PIPELINE_Y1,
|
||||
TILEPRO_PIPELINE_Y2,
|
||||
} tilepro_pipeline;
|
||||
|
||||
#define tilepro_is_x_pipeline(p) ((int)(p) <= (int)TILEPRO_PIPELINE_X1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TILEPRO_OP_TYPE_REGISTER,
|
||||
TILEPRO_OP_TYPE_IMMEDIATE,
|
||||
TILEPRO_OP_TYPE_ADDRESS,
|
||||
TILEPRO_OP_TYPE_SPR
|
||||
} tilepro_operand_type;
|
||||
|
||||
struct tilepro_operand
|
||||
{
|
||||
/* Is this operand a register, immediate or address? */
|
||||
tilepro_operand_type type;
|
||||
|
||||
/* The default relocation type for this operand. */
|
||||
signed int default_reloc : 16;
|
||||
|
||||
/* How many bits is this value? (used for range checking) */
|
||||
unsigned int num_bits : 5;
|
||||
|
||||
/* Is the value signed? (used for range checking) */
|
||||
unsigned int is_signed : 1;
|
||||
|
||||
/* Is this operand a source register? */
|
||||
unsigned int is_src_reg : 1;
|
||||
|
||||
/* Is this operand written? (i.e. is it a destination register) */
|
||||
unsigned int is_dest_reg : 1;
|
||||
|
||||
/* Is this operand PC-relative? */
|
||||
unsigned int is_pc_relative : 1;
|
||||
|
||||
/* By how many bits do we right shift the value before inserting? */
|
||||
unsigned int rightshift : 2;
|
||||
|
||||
/* Return the bits for this operand to be ORed into an existing bundle. */
|
||||
tilepro_bundle_bits (*insert) (int op);
|
||||
|
||||
/* Extract this operand and return it. */
|
||||
unsigned int (*extract) (tilepro_bundle_bits bundle);
|
||||
};
|
||||
|
||||
|
||||
extern const struct tilepro_operand tilepro_operands[];
|
||||
|
||||
/* One finite-state machine per pipe for rapid instruction decoding. */
|
||||
extern const unsigned short * const
|
||||
tilepro_bundle_decoder_fsms[TILEPRO_NUM_PIPELINE_ENCODINGS];
|
||||
|
||||
|
||||
struct tilepro_opcode
|
||||
{
|
||||
/* The opcode mnemonic, e.g. "add" */
|
||||
const char *name;
|
||||
|
||||
/* The enum value for this mnemonic. */
|
||||
tilepro_mnemonic mnemonic;
|
||||
|
||||
/* A bit mask of which of the five pipes this instruction
|
||||
is compatible with:
|
||||
X0 0x01
|
||||
X1 0x02
|
||||
Y0 0x04
|
||||
Y1 0x08
|
||||
Y2 0x10 */
|
||||
unsigned char pipes;
|
||||
|
||||
/* How many operands are there? */
|
||||
unsigned char num_operands;
|
||||
|
||||
/* Which register does this write implicitly, or TREG_ZERO if none? */
|
||||
unsigned char implicitly_written_register;
|
||||
|
||||
/* Can this be bundled with other instructions (almost always true). */
|
||||
unsigned char can_bundle;
|
||||
|
||||
/* The description of the operands. Each of these is an
|
||||
* index into the tilepro_operands[] table. */
|
||||
unsigned char operands[TILEPRO_NUM_PIPELINE_ENCODINGS][TILEPRO_MAX_OPERANDS];
|
||||
|
||||
};
|
||||
|
||||
extern const struct tilepro_opcode tilepro_opcodes[];
|
||||
|
||||
|
||||
/* Used for non-textual disassembly into structs. */
|
||||
struct tilepro_decoded_instruction
|
||||
{
|
||||
const struct tilepro_opcode *opcode;
|
||||
const struct tilepro_operand *operands[TILEPRO_MAX_OPERANDS];
|
||||
int operand_values[TILEPRO_MAX_OPERANDS];
|
||||
};
|
||||
|
||||
|
||||
/* Disassemble a bundle into a struct for machine processing. */
|
||||
extern int parse_insn_tilepro(tilepro_bundle_bits bits,
|
||||
unsigned int pc,
|
||||
struct tilepro_decoded_instruction
|
||||
decoded[TILEPRO_MAX_INSTRUCTIONS_PER_BUNDLE]);
|
||||
|
||||
|
||||
/* Given a set of bundle bits and a specific pipe, returns which
|
||||
* instruction the bundle contains in that pipe.
|
||||
*/
|
||||
extern const struct tilepro_opcode *
|
||||
find_opcode(tilepro_bundle_bits bits, tilepro_pipeline pipe);
|
||||
|
||||
|
||||
|
||||
#endif /* opcode_tilepro_h */
|
483
arch/tile/include/asm/tile-desc_64.h
Normal file
483
arch/tile/include/asm/tile-desc_64.h
Normal file
@ -0,0 +1,483 @@
|
||||
/* TILE-Gx opcode information.
|
||||
*
|
||||
* Copyright 2011 Tilera Corporation. All Rights Reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation, version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
|
||||
* NON INFRINGEMENT. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef opcode_tile_h
|
||||
#define opcode_tile_h
|
||||
|
||||
#include <arch/opcode.h>
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
TILEGX_MAX_OPERANDS = 4 /* bfexts */
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TILEGX_OPC_BPT,
|
||||
TILEGX_OPC_INFO,
|
||||
TILEGX_OPC_INFOL,
|
||||
TILEGX_OPC_MOVE,
|
||||
TILEGX_OPC_MOVEI,
|
||||
TILEGX_OPC_MOVELI,
|
||||
TILEGX_OPC_PREFETCH,
|
||||
TILEGX_OPC_PREFETCH_ADD_L1,
|
||||
TILEGX_OPC_PREFETCH_ADD_L1_FAULT,
|
||||
TILEGX_OPC_PREFETCH_ADD_L2,
|
||||
TILEGX_OPC_PREFETCH_ADD_L2_FAULT,
|
||||
TILEGX_OPC_PREFETCH_ADD_L3,
|
||||
TILEGX_OPC_PREFETCH_ADD_L3_FAULT,
|
||||
TILEGX_OPC_PREFETCH_L1,
|
||||
TILEGX_OPC_PREFETCH_L1_FAULT,
|
||||
TILEGX_OPC_PREFETCH_L2,
|
||||
TILEGX_OPC_PREFETCH_L2_FAULT,
|
||||
TILEGX_OPC_PREFETCH_L3,
|
||||
TILEGX_OPC_PREFETCH_L3_FAULT,
|
||||
TILEGX_OPC_RAISE,
|
||||
TILEGX_OPC_ADD,
|
||||
TILEGX_OPC_ADDI,
|
||||
TILEGX_OPC_ADDLI,
|
||||
TILEGX_OPC_ADDX,
|
||||
TILEGX_OPC_ADDXI,
|
||||
TILEGX_OPC_ADDXLI,
|
||||
TILEGX_OPC_ADDXSC,
|
||||
TILEGX_OPC_AND,
|
||||
TILEGX_OPC_ANDI,
|
||||
TILEGX_OPC_BEQZ,
|
||||
TILEGX_OPC_BEQZT,
|
||||
TILEGX_OPC_BFEXTS,
|
||||
TILEGX_OPC_BFEXTU,
|
||||
TILEGX_OPC_BFINS,
|
||||
TILEGX_OPC_BGEZ,
|
||||
TILEGX_OPC_BGEZT,
|
||||
TILEGX_OPC_BGTZ,
|
||||
TILEGX_OPC_BGTZT,
|
||||
TILEGX_OPC_BLBC,
|
||||
TILEGX_OPC_BLBCT,
|
||||
TILEGX_OPC_BLBS,
|
||||
TILEGX_OPC_BLBST,
|
||||
TILEGX_OPC_BLEZ,
|
||||
TILEGX_OPC_BLEZT,
|
||||
TILEGX_OPC_BLTZ,
|
||||
TILEGX_OPC_BLTZT,
|
||||
TILEGX_OPC_BNEZ,
|
||||
TILEGX_OPC_BNEZT,
|
||||
TILEGX_OPC_CLZ,
|
||||
TILEGX_OPC_CMOVEQZ,
|
||||
TILEGX_OPC_CMOVNEZ,
|
||||
TILEGX_OPC_CMPEQ,
|
||||
TILEGX_OPC_CMPEQI,
|
||||
TILEGX_OPC_CMPEXCH,
|
||||
TILEGX_OPC_CMPEXCH4,
|
||||
TILEGX_OPC_CMPLES,
|
||||
TILEGX_OPC_CMPLEU,
|
||||
TILEGX_OPC_CMPLTS,
|
||||
TILEGX_OPC_CMPLTSI,
|
||||
TILEGX_OPC_CMPLTU,
|
||||
TILEGX_OPC_CMPLTUI,
|
||||
TILEGX_OPC_CMPNE,
|
||||
TILEGX_OPC_CMUL,
|
||||
TILEGX_OPC_CMULA,
|
||||
TILEGX_OPC_CMULAF,
|
||||
TILEGX_OPC_CMULF,
|
||||
TILEGX_OPC_CMULFR,
|
||||
TILEGX_OPC_CMULH,
|
||||
TILEGX_OPC_CMULHR,
|
||||
TILEGX_OPC_CRC32_32,
|
||||
TILEGX_OPC_CRC32_8,
|
||||
TILEGX_OPC_CTZ,
|
||||
TILEGX_OPC_DBLALIGN,
|
||||
TILEGX_OPC_DBLALIGN2,
|
||||
TILEGX_OPC_DBLALIGN4,
|
||||
TILEGX_OPC_DBLALIGN6,
|
||||
TILEGX_OPC_DRAIN,
|
||||
TILEGX_OPC_DTLBPR,
|
||||
TILEGX_OPC_EXCH,
|
||||
TILEGX_OPC_EXCH4,
|
||||
TILEGX_OPC_FDOUBLE_ADD_FLAGS,
|
||||
TILEGX_OPC_FDOUBLE_ADDSUB,
|
||||
TILEGX_OPC_FDOUBLE_MUL_FLAGS,
|
||||
TILEGX_OPC_FDOUBLE_PACK1,
|
||||
TILEGX_OPC_FDOUBLE_PACK2,
|
||||
TILEGX_OPC_FDOUBLE_SUB_FLAGS,
|
||||
TILEGX_OPC_FDOUBLE_UNPACK_MAX,
|
||||
TILEGX_OPC_FDOUBLE_UNPACK_MIN,
|
||||
TILEGX_OPC_FETCHADD,
|
||||
TILEGX_OPC_FETCHADD4,
|
||||
TILEGX_OPC_FETCHADDGEZ,
|
||||
TILEGX_OPC_FETCHADDGEZ4,
|
||||
TILEGX_OPC_FETCHAND,
|
||||
TILEGX_OPC_FETCHAND4,
|
||||
TILEGX_OPC_FETCHOR,
|
||||
TILEGX_OPC_FETCHOR4,
|
||||
TILEGX_OPC_FINV,
|
||||
TILEGX_OPC_FLUSH,
|
||||
TILEGX_OPC_FLUSHWB,
|
||||
TILEGX_OPC_FNOP,
|
||||
TILEGX_OPC_FSINGLE_ADD1,
|
||||
TILEGX_OPC_FSINGLE_ADDSUB2,
|
||||
TILEGX_OPC_FSINGLE_MUL1,
|
||||
TILEGX_OPC_FSINGLE_MUL2,
|
||||
TILEGX_OPC_FSINGLE_PACK1,
|
||||
TILEGX_OPC_FSINGLE_PACK2,
|
||||
TILEGX_OPC_FSINGLE_SUB1,
|
||||
TILEGX_OPC_ICOH,
|
||||
TILEGX_OPC_ILL,
|
||||
TILEGX_OPC_INV,
|
||||
TILEGX_OPC_IRET,
|
||||
TILEGX_OPC_J,
|
||||
TILEGX_OPC_JAL,
|
||||
TILEGX_OPC_JALR,
|
||||
TILEGX_OPC_JALRP,
|
||||
TILEGX_OPC_JR,
|
||||
TILEGX_OPC_JRP,
|
||||
TILEGX_OPC_LD,
|
||||
TILEGX_OPC_LD1S,
|
||||
TILEGX_OPC_LD1S_ADD,
|
||||
TILEGX_OPC_LD1U,
|
||||
TILEGX_OPC_LD1U_ADD,
|
||||
TILEGX_OPC_LD2S,
|
||||
TILEGX_OPC_LD2S_ADD,
|
||||
TILEGX_OPC_LD2U,
|
||||
TILEGX_OPC_LD2U_ADD,
|
||||
TILEGX_OPC_LD4S,
|
||||
TILEGX_OPC_LD4S_ADD,
|
||||
TILEGX_OPC_LD4U,
|
||||
TILEGX_OPC_LD4U_ADD,
|
||||
TILEGX_OPC_LD_ADD,
|
||||
TILEGX_OPC_LDNA,
|
||||
TILEGX_OPC_LDNA_ADD,
|
||||
TILEGX_OPC_LDNT,
|
||||
TILEGX_OPC_LDNT1S,
|
||||
TILEGX_OPC_LDNT1S_ADD,
|
||||
TILEGX_OPC_LDNT1U,
|
||||
TILEGX_OPC_LDNT1U_ADD,
|
||||
TILEGX_OPC_LDNT2S,
|
||||
TILEGX_OPC_LDNT2S_ADD,
|
||||
TILEGX_OPC_LDNT2U,
|
||||
TILEGX_OPC_LDNT2U_ADD,
|
||||
TILEGX_OPC_LDNT4S,
|
||||
TILEGX_OPC_LDNT4S_ADD,
|
||||
TILEGX_OPC_LDNT4U,
|
||||
TILEGX_OPC_LDNT4U_ADD,
|
||||
TILEGX_OPC_LDNT_ADD,
|
||||
TILEGX_OPC_LNK,
|
||||
TILEGX_OPC_MF,
|
||||
TILEGX_OPC_MFSPR,
|
||||
TILEGX_OPC_MM,
|
||||
TILEGX_OPC_MNZ,
|
||||
TILEGX_OPC_MTSPR,
|
||||
TILEGX_OPC_MUL_HS_HS,
|
||||
TILEGX_OPC_MUL_HS_HU,
|
||||
TILEGX_OPC_MUL_HS_LS,
|
||||
TILEGX_OPC_MUL_HS_LU,
|
||||
TILEGX_OPC_MUL_HU_HU,
|
||||
TILEGX_OPC_MUL_HU_LS,
|
||||
TILEGX_OPC_MUL_HU_LU,
|
||||
TILEGX_OPC_MUL_LS_LS,
|
||||
TILEGX_OPC_MUL_LS_LU,
|
||||
TILEGX_OPC_MUL_LU_LU,
|
||||
TILEGX_OPC_MULA_HS_HS,
|
||||
TILEGX_OPC_MULA_HS_HU,
|
||||
TILEGX_OPC_MULA_HS_LS,
|
||||
TILEGX_OPC_MULA_HS_LU,
|
||||
TILEGX_OPC_MULA_HU_HU,
|
||||
TILEGX_OPC_MULA_HU_LS,
|
||||
TILEGX_OPC_MULA_HU_LU,
|
||||
TILEGX_OPC_MULA_LS_LS,
|
||||
TILEGX_OPC_MULA_LS_LU,
|
||||
TILEGX_OPC_MULA_LU_LU,
|
||||
TILEGX_OPC_MULAX,
|
||||
TILEGX_OPC_MULX,
|
||||
TILEGX_OPC_MZ,
|
||||
TILEGX_OPC_NAP,
|
||||
TILEGX_OPC_NOP,
|
||||
TILEGX_OPC_NOR,
|
||||
TILEGX_OPC_OR,
|
||||
TILEGX_OPC_ORI,
|
||||
TILEGX_OPC_PCNT,
|
||||
TILEGX_OPC_REVBITS,
|
||||
TILEGX_OPC_REVBYTES,
|
||||
TILEGX_OPC_ROTL,
|
||||
TILEGX_OPC_ROTLI,
|
||||
TILEGX_OPC_SHL,
|
||||
TILEGX_OPC_SHL16INSLI,
|
||||
TILEGX_OPC_SHL1ADD,
|
||||
TILEGX_OPC_SHL1ADDX,
|
||||
TILEGX_OPC_SHL2ADD,
|
||||
TILEGX_OPC_SHL2ADDX,
|
||||
TILEGX_OPC_SHL3ADD,
|
||||
TILEGX_OPC_SHL3ADDX,
|
||||
TILEGX_OPC_SHLI,
|
||||
TILEGX_OPC_SHLX,
|
||||
TILEGX_OPC_SHLXI,
|
||||
TILEGX_OPC_SHRS,
|
||||
TILEGX_OPC_SHRSI,
|
||||
TILEGX_OPC_SHRU,
|
||||
TILEGX_OPC_SHRUI,
|
||||
TILEGX_OPC_SHRUX,
|
||||
TILEGX_OPC_SHRUXI,
|
||||
TILEGX_OPC_SHUFFLEBYTES,
|
||||
TILEGX_OPC_ST,
|
||||
TILEGX_OPC_ST1,
|
||||
TILEGX_OPC_ST1_ADD,
|
||||
TILEGX_OPC_ST2,
|
||||
TILEGX_OPC_ST2_ADD,
|
||||
TILEGX_OPC_ST4,
|
||||
TILEGX_OPC_ST4_ADD,
|
||||
TILEGX_OPC_ST_ADD,
|
||||
TILEGX_OPC_STNT,
|
||||
TILEGX_OPC_STNT1,
|
||||
TILEGX_OPC_STNT1_ADD,
|
||||
TILEGX_OPC_STNT2,
|
||||
TILEGX_OPC_STNT2_ADD,
|
||||
TILEGX_OPC_STNT4,
|
||||
TILEGX_OPC_STNT4_ADD,
|
||||
TILEGX_OPC_STNT_ADD,
|
||||
TILEGX_OPC_SUB,
|
||||
TILEGX_OPC_SUBX,
|
||||
TILEGX_OPC_SUBXSC,
|
||||
TILEGX_OPC_SWINT0,
|
||||
TILEGX_OPC_SWINT1,
|
||||
TILEGX_OPC_SWINT2,
|
||||
TILEGX_OPC_SWINT3,
|
||||
TILEGX_OPC_TBLIDXB0,
|
||||
TILEGX_OPC_TBLIDXB1,
|
||||
TILEGX_OPC_TBLIDXB2,
|
||||
TILEGX_OPC_TBLIDXB3,
|
||||
TILEGX_OPC_V1ADD,
|
||||
TILEGX_OPC_V1ADDI,
|
||||
TILEGX_OPC_V1ADDUC,
|
||||
TILEGX_OPC_V1ADIFFU,
|
||||
TILEGX_OPC_V1AVGU,
|
||||
TILEGX_OPC_V1CMPEQ,
|
||||
TILEGX_OPC_V1CMPEQI,
|
||||
TILEGX_OPC_V1CMPLES,
|
||||
TILEGX_OPC_V1CMPLEU,
|
||||
TILEGX_OPC_V1CMPLTS,
|
||||
TILEGX_OPC_V1CMPLTSI,
|
||||
TILEGX_OPC_V1CMPLTU,
|
||||
TILEGX_OPC_V1CMPLTUI,
|
||||
TILEGX_OPC_V1CMPNE,
|
||||
TILEGX_OPC_V1DDOTPU,
|
||||
TILEGX_OPC_V1DDOTPUA,
|
||||
TILEGX_OPC_V1DDOTPUS,
|
||||
TILEGX_OPC_V1DDOTPUSA,
|
||||
TILEGX_OPC_V1DOTP,
|
||||
TILEGX_OPC_V1DOTPA,
|
||||
TILEGX_OPC_V1DOTPU,
|
||||
TILEGX_OPC_V1DOTPUA,
|
||||
TILEGX_OPC_V1DOTPUS,
|
||||
TILEGX_OPC_V1DOTPUSA,
|
||||
TILEGX_OPC_V1INT_H,
|
||||
TILEGX_OPC_V1INT_L,
|
||||
TILEGX_OPC_V1MAXU,
|
||||
TILEGX_OPC_V1MAXUI,
|
||||
TILEGX_OPC_V1MINU,
|
||||
TILEGX_OPC_V1MINUI,
|
||||
TILEGX_OPC_V1MNZ,
|
||||
TILEGX_OPC_V1MULTU,
|
||||
TILEGX_OPC_V1MULU,
|
||||
TILEGX_OPC_V1MULUS,
|
||||
TILEGX_OPC_V1MZ,
|
||||
TILEGX_OPC_V1SADAU,
|
||||
TILEGX_OPC_V1SADU,
|
||||
TILEGX_OPC_V1SHL,
|
||||
TILEGX_OPC_V1SHLI,
|
||||
TILEGX_OPC_V1SHRS,
|
||||
TILEGX_OPC_V1SHRSI,
|
||||
TILEGX_OPC_V1SHRU,
|
||||
TILEGX_OPC_V1SHRUI,
|
||||
TILEGX_OPC_V1SUB,
|
||||
TILEGX_OPC_V1SUBUC,
|
||||
TILEGX_OPC_V2ADD,
|
||||
TILEGX_OPC_V2ADDI,
|
||||
TILEGX_OPC_V2ADDSC,
|
||||
TILEGX_OPC_V2ADIFFS,
|
||||
TILEGX_OPC_V2AVGS,
|
||||
TILEGX_OPC_V2CMPEQ,
|
||||
TILEGX_OPC_V2CMPEQI,
|
||||
TILEGX_OPC_V2CMPLES,
|
||||
TILEGX_OPC_V2CMPLEU,
|
||||
TILEGX_OPC_V2CMPLTS,
|
||||
TILEGX_OPC_V2CMPLTSI,
|
||||
TILEGX_OPC_V2CMPLTU,
|
||||
TILEGX_OPC_V2CMPLTUI,
|
||||
TILEGX_OPC_V2CMPNE,
|
||||
TILEGX_OPC_V2DOTP,
|
||||
TILEGX_OPC_V2DOTPA,
|
||||
TILEGX_OPC_V2INT_H,
|
||||
TILEGX_OPC_V2INT_L,
|
||||
TILEGX_OPC_V2MAXS,
|
||||
TILEGX_OPC_V2MAXSI,
|
||||
TILEGX_OPC_V2MINS,
|
||||
TILEGX_OPC_V2MINSI,
|
||||
TILEGX_OPC_V2MNZ,
|
||||
TILEGX_OPC_V2MULFSC,
|
||||
TILEGX_OPC_V2MULS,
|
||||
TILEGX_OPC_V2MULTS,
|
||||
TILEGX_OPC_V2MZ,
|
||||
TILEGX_OPC_V2PACKH,
|
||||
TILEGX_OPC_V2PACKL,
|
||||
TILEGX_OPC_V2PACKUC,
|
||||
TILEGX_OPC_V2SADAS,
|
||||
TILEGX_OPC_V2SADAU,
|
||||
TILEGX_OPC_V2SADS,
|
||||
TILEGX_OPC_V2SADU,
|
||||
TILEGX_OPC_V2SHL,
|
||||
TILEGX_OPC_V2SHLI,
|
||||
TILEGX_OPC_V2SHLSC,
|
||||
TILEGX_OPC_V2SHRS,
|
||||
TILEGX_OPC_V2SHRSI,
|
||||
TILEGX_OPC_V2SHRU,
|
||||
TILEGX_OPC_V2SHRUI,
|
||||
TILEGX_OPC_V2SUB,
|
||||
TILEGX_OPC_V2SUBSC,
|
||||
TILEGX_OPC_V4ADD,
|
||||
TILEGX_OPC_V4ADDSC,
|
||||
TILEGX_OPC_V4INT_H,
|
||||
TILEGX_OPC_V4INT_L,
|
||||
TILEGX_OPC_V4PACKSC,
|
||||
TILEGX_OPC_V4SHL,
|
||||
TILEGX_OPC_V4SHLSC,
|
||||
TILEGX_OPC_V4SHRS,
|
||||
TILEGX_OPC_V4SHRU,
|
||||
TILEGX_OPC_V4SUB,
|
||||
TILEGX_OPC_V4SUBSC,
|
||||
TILEGX_OPC_WH64,
|
||||
TILEGX_OPC_XOR,
|
||||
TILEGX_OPC_XORI,
|
||||
TILEGX_OPC_NONE
|
||||
} tilegx_mnemonic;
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TILEGX_PIPELINE_X0,
|
||||
TILEGX_PIPELINE_X1,
|
||||
TILEGX_PIPELINE_Y0,
|
||||
TILEGX_PIPELINE_Y1,
|
||||
TILEGX_PIPELINE_Y2,
|
||||
} tilegx_pipeline;
|
||||
|
||||
#define tilegx_is_x_pipeline(p) ((int)(p) <= (int)TILEGX_PIPELINE_X1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TILEGX_OP_TYPE_REGISTER,
|
||||
TILEGX_OP_TYPE_IMMEDIATE,
|
||||
TILEGX_OP_TYPE_ADDRESS,
|
||||
TILEGX_OP_TYPE_SPR
|
||||
} tilegx_operand_type;
|
||||
|
||||
struct tilegx_operand
|
||||
{
|
||||
/* Is this operand a register, immediate or address? */
|
||||
tilegx_operand_type type;
|
||||
|
||||
/* The default relocation type for this operand. */
|
||||
signed int default_reloc : 16;
|
||||
|
||||
/* How many bits is this value? (used for range checking) */
|
||||
unsigned int num_bits : 5;
|
||||
|
||||
/* Is the value signed? (used for range checking) */
|
||||
unsigned int is_signed : 1;
|
||||
|
||||
/* Is this operand a source register? */
|
||||
unsigned int is_src_reg : 1;
|
||||
|
||||
/* Is this operand written? (i.e. is it a destination register) */
|
||||
unsigned int is_dest_reg : 1;
|
||||
|
||||
/* Is this operand PC-relative? */
|
||||
unsigned int is_pc_relative : 1;
|
||||
|
||||
/* By how many bits do we right shift the value before inserting? */
|
||||
unsigned int rightshift : 2;
|
||||
|
||||
/* Return the bits for this operand to be ORed into an existing bundle. */
|
||||
tilegx_bundle_bits (*insert) (int op);
|
||||
|
||||
/* Extract this operand and return it. */
|
||||
unsigned int (*extract) (tilegx_bundle_bits bundle);
|
||||
};
|
||||
|
||||
|
||||
extern const struct tilegx_operand tilegx_operands[];
|
||||
|
||||
/* One finite-state machine per pipe for rapid instruction decoding. */
|
||||
extern const unsigned short * const
|
||||
tilegx_bundle_decoder_fsms[TILEGX_NUM_PIPELINE_ENCODINGS];
|
||||
|
||||
|
||||
struct tilegx_opcode
|
||||
{
|
||||
/* The opcode mnemonic, e.g. "add" */
|
||||
const char *name;
|
||||
|
||||
/* The enum value for this mnemonic. */
|
||||
tilegx_mnemonic mnemonic;
|
||||
|
||||
/* A bit mask of which of the five pipes this instruction
|
||||
is compatible with:
|
||||
X0 0x01
|
||||
X1 0x02
|
||||
Y0 0x04
|
||||
Y1 0x08
|
||||
Y2 0x10 */
|
||||
unsigned char pipes;
|
||||
|
||||
/* How many operands are there? */
|
||||
unsigned char num_operands;
|
||||
|
||||
/* Which register does this write implicitly, or TREG_ZERO if none? */
|
||||
unsigned char implicitly_written_register;
|
||||
|
||||
/* Can this be bundled with other instructions (almost always true). */
|
||||
unsigned char can_bundle;
|
||||
|
||||
/* The description of the operands. Each of these is an
|
||||
* index into the tilegx_operands[] table. */
|
||||
unsigned char operands[TILEGX_NUM_PIPELINE_ENCODINGS][TILEGX_MAX_OPERANDS];
|
||||
|
||||
};
|
||||
|
||||
extern const struct tilegx_opcode tilegx_opcodes[];
|
||||
|
||||
/* Used for non-textual disassembly into structs. */
|
||||
struct tilegx_decoded_instruction
|
||||
{
|
||||
const struct tilegx_opcode *opcode;
|
||||
const struct tilegx_operand *operands[TILEGX_MAX_OPERANDS];
|
||||
long long operand_values[TILEGX_MAX_OPERANDS];
|
||||
};
|
||||
|
||||
|
||||
/* Disassemble a bundle into a struct for machine processing. */
|
||||
extern int parse_insn_tilegx(tilegx_bundle_bits bits,
|
||||
unsigned long long pc,
|
||||
struct tilegx_decoded_instruction
|
||||
decoded[TILEGX_MAX_INSTRUCTIONS_PER_BUNDLE]);
|
||||
|
||||
|
||||
|
||||
#endif /* opcode_tilegx_h */
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010 Tilera Corporation. All Rights Reserved.
|
||||
* Copyright 2011 Tilera Corporation. All Rights Reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -15,13 +15,11 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/string.h>
|
||||
#include <asm/backtrace.h>
|
||||
#include <asm/opcode-tile.h>
|
||||
#include <asm/tile-desc.h>
|
||||
#include <arch/abi.h>
|
||||
|
||||
#ifdef __tilegx__
|
||||
#define tile_bundle_bits tilegx_bundle_bits
|
||||
#define TILE_MAX_INSTRUCTIONS_PER_BUNDLE TILEGX_MAX_INSTRUCTIONS_PER_BUNDLE
|
||||
#define TILE_BUNDLE_ALIGNMENT_IN_BYTES TILEGX_BUNDLE_ALIGNMENT_IN_BYTES
|
||||
#define tile_decoded_instruction tilegx_decoded_instruction
|
||||
#define tile_mnemonic tilegx_mnemonic
|
||||
#define parse_insn_tile parse_insn_tilegx
|
||||
@ -35,7 +33,18 @@
|
||||
#define OPCODE_STORE TILEGX_OPC_ST
|
||||
typedef long long bt_int_reg_t;
|
||||
#else
|
||||
#define OPCODE_STORE TILE_OPC_SW
|
||||
#define TILE_MAX_INSTRUCTIONS_PER_BUNDLE TILEPRO_MAX_INSTRUCTIONS_PER_BUNDLE
|
||||
#define tile_decoded_instruction tilepro_decoded_instruction
|
||||
#define tile_mnemonic tilepro_mnemonic
|
||||
#define parse_insn_tile parse_insn_tilepro
|
||||
#define TILE_OPC_IRET TILEPRO_OPC_IRET
|
||||
#define TILE_OPC_ADDI TILEPRO_OPC_ADDI
|
||||
#define TILE_OPC_ADDLI TILEPRO_OPC_ADDLI
|
||||
#define TILE_OPC_INFO TILEPRO_OPC_INFO
|
||||
#define TILE_OPC_INFOL TILEPRO_OPC_INFOL
|
||||
#define TILE_OPC_JRP TILEPRO_OPC_JRP
|
||||
#define TILE_OPC_MOVE TILEPRO_OPC_MOVE
|
||||
#define OPCODE_STORE TILEPRO_OPC_SW
|
||||
typedef int bt_int_reg_t;
|
||||
#endif
|
||||
|
||||
|
@ -20,9 +20,9 @@
|
||||
#include <linux/fs.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <asm/opcode-tile.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/homecache.h>
|
||||
#include <arch/opcode.h>
|
||||
|
||||
#ifdef __tilegx__
|
||||
# define Elf_Rela Elf64_Rela
|
||||
|
@ -25,9 +25,8 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/err.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/opcode-tile.h>
|
||||
#include <asm/opcode_constants.h>
|
||||
#include <arch/abi.h>
|
||||
#include <arch/opcode.h>
|
||||
|
||||
#define signExtend17(val) sign_extend((val), 17)
|
||||
#define TILE_X1_MASK (0xffffffffULL << 31)
|
||||
@ -118,7 +117,7 @@ static tile_bundle_bits rewrite_load_store_unaligned(
|
||||
int val_reg, addr_reg, err, val;
|
||||
|
||||
/* Get address and value registers */
|
||||
if (bundle & TILE_BUNDLE_Y_ENCODING_MASK) {
|
||||
if (bundle & TILEPRO_BUNDLE_Y_ENCODING_MASK) {
|
||||
addr_reg = get_SrcA_Y2(bundle);
|
||||
val_reg = get_SrcBDest_Y2(bundle);
|
||||
} else if (mem_op == MEMOP_LOAD || mem_op == MEMOP_LOAD_POSTINCR) {
|
||||
@ -229,7 +228,7 @@ P("\n");
|
||||
}
|
||||
++unaligned_fixup_count;
|
||||
|
||||
if (bundle & TILE_BUNDLE_Y_ENCODING_MASK) {
|
||||
if (bundle & TILEPRO_BUNDLE_Y_ENCODING_MASK) {
|
||||
/* Convert the Y2 instruction to a prefetch. */
|
||||
bundle &= ~(create_SrcBDest_Y2(-1) |
|
||||
create_Opcode_Y2(-1));
|
||||
@ -389,7 +388,7 @@ void single_step_once(struct pt_regs *regs)
|
||||
state->branch_next_pc = 0;
|
||||
state->update = 0;
|
||||
|
||||
if (!(bundle & TILE_BUNDLE_Y_ENCODING_MASK)) {
|
||||
if (!(bundle & TILEPRO_BUNDLE_Y_ENCODING_MASK)) {
|
||||
/* two wide, check for control flow */
|
||||
int opcode = get_Opcode_X1(bundle);
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,23 @@
|
||||
/* TILE-Gx opcode information.
|
||||
*
|
||||
* Copyright 2011 Tilera Corporation. All Rights Reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation, version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
|
||||
* NON INFRINGEMENT. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/* This define is BFD_RELOC_##x for real bfd, or -1 for everyone else. */
|
||||
#define BFD_RELOC(x) -1
|
||||
|
||||
@ -6,10 +26,8 @@
|
||||
#define TREG_SN 56
|
||||
#define TREG_ZERO 63
|
||||
|
||||
/* FIXME: Rename this. */
|
||||
#include <asm/opcode-tile_64.h>
|
||||
|
||||
#include <linux/stddef.h>
|
||||
#include <asm/tile-desc.h>
|
||||
|
||||
const struct tilegx_opcode tilegx_opcodes[334] =
|
||||
{
|
||||
@ -2040,12 +2058,12 @@ const struct tilegx_operand tilegx_operands[35] =
|
||||
create_BrOff_X1, get_BrOff_X1
|
||||
},
|
||||
{
|
||||
TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(NONE),
|
||||
TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(TILEGX_MMSTART_X0),
|
||||
6, 0, 0, 0, 0, 0,
|
||||
create_BFStart_X0, get_BFStart_X0
|
||||
},
|
||||
{
|
||||
TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(NONE),
|
||||
TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(TILEGX_MMEND_X0),
|
||||
6, 0, 0, 0, 0, 0,
|
||||
create_BFEnd_X0, get_BFEnd_X0
|
||||
},
|
||||
|
@ -19,13 +19,12 @@
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <asm/opcode-tile.h>
|
||||
#include <asm/opcode_constants.h>
|
||||
#include <asm/stack.h>
|
||||
#include <asm/traps.h>
|
||||
|
||||
#include <arch/interrupts.h>
|
||||
#include <arch/spr_def.h>
|
||||
#include <arch/opcode.h>
|
||||
|
||||
void __init trap_init(void)
|
||||
{
|
||||
@ -135,7 +134,7 @@ static int special_ill(bundle_bits bundle, int *sigp, int *codep)
|
||||
if (get_UnaryOpcodeExtension_X1(bundle) != ILL_UNARY_OPCODE_X1)
|
||||
return 0;
|
||||
#else
|
||||
if (bundle & TILE_BUNDLE_Y_ENCODING_MASK)
|
||||
if (bundle & TILEPRO_BUNDLE_Y_ENCODING_MASK)
|
||||
return 0;
|
||||
if (get_Opcode_X1(bundle) != SHUN_0_OPCODE_X1)
|
||||
return 0;
|
||||
|
@ -79,8 +79,6 @@ EXPORT_SYMBOL(__umoddi3);
|
||||
int64_t __moddi3(int64_t dividend, int64_t divisor);
|
||||
EXPORT_SYMBOL(__moddi3);
|
||||
#ifndef __tilegx__
|
||||
uint64_t __ll_mul(uint64_t n0, uint64_t n1);
|
||||
EXPORT_SYMBOL(__ll_mul);
|
||||
int64_t __muldi3(int64_t, int64_t);
|
||||
EXPORT_SYMBOL(__muldi3);
|
||||
uint64_t __lshrdi3(uint64_t, unsigned int);
|
||||
|
Loading…
Reference in New Issue
Block a user