Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
lib.h
Go to the documentation of this file.
1
#pragma once
2
#include <stdio.h>
3
4
struct
Reg
{
5
int
r_
;
6
Reg
(
int
r
) :
r_
(
r
) {}
7
};
8
9
inline
const
Reg
&
getReg0
() {
static
const
Reg
r
(0);
return
r
; }
10
inline
const
Reg
&
getReg1
() {
static
const
Reg
r
(1);
return
r
; }
11
inline
const
Reg
&
getReg2
() {
static
const
Reg
r
(2);
return
r
; }
12
13
static
const
Reg
& r0 =
getReg0
();
14
static
const
Reg
& r1 =
getReg1
();
15
static
const
Reg
& r2 =
getReg2
();
16
17
inline
void
putReg
()
18
{
19
puts(
"putReg"
);
20
printf(
"r0=%p, %d\n"
, &r0, r0.
r_
);
21
printf(
"r0=%p, %d\n"
, &r0, r1.
r_
);
22
printf(
"r0=%p, %d\n"
, &r0, r2.
r_
);
23
}
24
25
struct
A
{
26
int
a
;
27
A
()
28
:
a
(5)
29
{
30
puts(
"A cstr"
);
31
}
32
~A
()
33
{
34
puts(
"A dstr"
);
35
}
36
void
put
()
const
37
{
38
printf(
"a=%d\n"
,
a
);
39
}
40
};
41
42
template
<
int
dummy = 0>
43
struct
XT
{
44
static
A
a
;
45
};
46
47
template
<
int
dummy>
48
A
XT<dummy>::a
;
49
50
typedef
XT<0>
X
;
51
52
void
init
();
53
54
struct
Init
{
55
Init
()
56
{
57
puts(
"Init"
);
58
init
();
59
putReg
();
60
}
61
};
62
static
Init
s_init;
63
r
const mie::Vuint & r
Definition
bn.cpp:28
init
void init()
Definition
lib_test.cpp:3
putReg
void putReg()
Definition
lib.h:17
X
XT< 0 > X
Definition
lib.h:50
getReg1
const Reg & getReg1()
Definition
lib.h:10
getReg2
const Reg & getReg2()
Definition
lib.h:11
getReg0
const Reg & getReg0()
Definition
lib.h:9
A
Definition
Tricky.tests.cpp:102
a
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition
pointer.h:1181
A::A
A()
Definition
lib.h:27
A::a
int a
Definition
lib.h:26
A::~A
~A()
Definition
lib.h:32
A::put
void put() const
Definition
lib.h:36
Init
Definition
lib.h:54
Init::Init
Init()
Definition
lib.h:55
Reg
Definition
lib.h:4
Reg::r_
int r_
Definition
lib.h:5
Reg::Reg
Reg(int r)
Definition
lib.h:6
XT
Definition
lib.h:43
XT::a
static A a
Definition
lib.h:44
libraries
fc
libraries
ff
depends
xbyak
test
lib.h
Generated by
1.12.0