OpenCores
URL https://opencores.org/ocsvn/scarm/scarm/trunk

Subversion Repositories scarm

[/] [scarm/] [trunk/] [src/] [scB.h] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 zhong
// scB.h: interface for the scB class.
2
/*                            -------------------
3
    begin                : Oct 2 2002
4
    copyright            : (C) 2002 UESTC
5
    author               : Zhong Tao
6
    email                : zhong@opencores.org
7
 ***************************************************************************/
8
 
9
/***************************************************************************
10
 *                                                                         *
11
 *   This program is free software; you can redistribute it and/or modify  *
12
 *   it under the terms of the GNU General Public License as published by  *
13
 *   the Free Software Foundation; either version 2 of the License, or     *
14
 *   (at your option) any later version.                                   *
15
 *                                                                         *
16
 ***************************************************************************/
17
 
18
#if !defined(AFX_SCB_H__FC5E6447_AB29_11D6_BB1E_000000000000__INCLUDED_)
19
#define AFX_SCB_H__FC5E6447_AB29_11D6_BB1E_000000000000__INCLUDED_
20
 
21
#include "scRegisterFile.h"     // Added by ClassView
22
#if _MSC_VER > 1000
23
#pragma once
24
#endif // _MSC_VER > 1000
25
#include "scARMInstruction.h"
26
#include "scTypes.h"    // Added by ClassView
27
#include "scALU.h"      // Added by ClassView
28
#include "scBarrelShifter.h"    // Added by ClassView
29
const uint32_t BRANCH_MASK= 0x0E000000;//branch and bl
30
const uint32_t BRANCH_SIG=  0x0A000000;
31
class scB  :public scARMInstruction
32
{
33
        typedef struct BLTAG
34
{
35
  uint32_t offset : 24;
36
  uint32_t   link   : 1;
37
  uint32_t pad    : 3;
38
  uint32_t cond   : 4;
39
} BRANCH;
40
        static const char* kind_string_b;
41
        static const char* kind_string_bl;
42
        BRANCH ir;
43
public:
44
        bool is_link();
45
        bool set();
46
        bool is_branch();
47
        bool load();
48
        bool pre();
49
        REGS Rn();
50
        bool wb();
51
        bool is_imm();
52
        COND cond();
53
        SHIFT shift_type();
54
        OPCODE op();
55
        uint32_t dist();
56
        uint32_t B();
57
        bool is_rs();
58
        bool is_mult();
59
        bool is_word();
60
        bool is_ls();
61
        bool is_shift();
62
        REGS Rd();
63
        uint32_t A();
64
        const char* kind();
65
        scB(uint32_t);
66
        virtual ~scB();
67
 
68
};
69
 
70
#endif // !defined(AFX_SCB_H__FC5E6447_AB29_11D6_BB1E_000000000000__INCLUDED_)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.