~ubuntu-branches/ubuntu/lucid/skyeye/lucid-proposed

« back to all changes in this revision

Viewing changes to arch/mips/common/mipsio.c

  • Committer: Bazaar Package Importer
  • Author(s): Yu Guanghui
  • Date: 2007-02-09 20:24:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070209202429-jknfb98t9ggaoz02
Tags: 1.2.1-2
Disable DBCT again.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "types.h"
 
2
#include "emul.h"
 
3
 
 
4
extern MIPS_State *mstate;
 
5
 
 
6
UInt32
 
7
mips_io_read_byte(UInt32 addr)
 
8
{
 
9
        if (mstate->p_mach->io_read_byte)
 
10
                return mstate->p_mach->io_read_byte(addr);
 
11
        else
 
12
                return 0;
 
13
}
 
14
 
 
15
UInt32
 
16
mips_io_read_halfword(UInt32 addr)
 
17
{       
 
18
        if (mstate->p_mach->io_read_halfword)
 
19
                return mstate->p_mach->io_read_halfword(addr);
 
20
        else
 
21
                return 0;
 
22
}
 
23
 
 
24
UInt32
 
25
mips_io_read_word(UInt32 addr)
 
26
{
 
27
        
 
28
        if (mstate->p_mach->io_read_word)
 
29
                return mstate->p_mach->io_read_word(addr);
 
30
        else
 
31
                return 0;
 
32
}
 
33
 
 
34
UInt64
 
35
mips_io_read_doubleword(UInt32 addr)
 
36
{
 
37
        return 0;
 
38
}
 
39
 
 
40
void
 
41
mips_io_write_byte(UInt32 addr, UInt32 data)
 
42
{
 
43
        
 
44
        if (mstate->p_mach->io_write_byte)
 
45
                mstate->p_mach->io_write_byte(addr, data);
 
46
}
 
47
 
 
48
void
 
49
mips_io_write_halfword(UInt32 addr, UInt32 data)
 
50
{
 
51
        
 
52
        if (mstate->p_mach->io_write_halfword)
 
53
                mstate->p_mach->io_write_halfword(addr, data);
 
54
}
 
55
 
 
56
void
 
57
mips_io_write_word(UInt32 addr, UInt32 data)
 
58
{
 
59
        
 
60
        if (mstate->p_mach->io_write_word)
 
61
                mstate->p_mach->io_write_word(addr, data);
 
62
}
 
63
 
 
64
void
 
65
mips_io_write_doubleword(UInt32 addr, UInt32 data)
 
66
{
 
67
 
 
68
}