Subversion Repositories eduke32

Rev

Rev 4601 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4601 Rev 4647
Line 13... Line 13...
13
int32_t dmval;
13
int32_t dmval;
14
14
15
#if defined(__GNUC__) && defined(GEKKO)
15
#if defined(__GNUC__) && defined(GEKKO)
16
16
17
// naked function (no prolog/epilog)
17
// naked function (no prolog/epilog)
-
 
18
#pragma GCC diagnostic push
-
 
19
#pragma GCC diagnostic ignored "-Wunused-parameter"
-
 
20
#pragma GCC diagnostic ignored "-Wreturn-type"
18
// FIXME: this function produces unused parameter warnings and a missing return warning
21
int32_t scale(int32_t a, int32_t d, int32_t c) ATTRIBUTE((naked));
19
int32_t scale(int32_t a, int32_t d, int32_t c)
22
int32_t scale(int32_t a, int32_t d, int32_t c)
20
{
23
{
21
//      return ((int64_t)a * d) / c;
24
//      return ((int64_t)a * d) / c;
22
25
23
        __asm__ __volatile__ (
26
        __asm__ __volatile__ (
Line 93... Line 96...
93
                " bltlr cr1\n"
96
                " bltlr cr1\n"
94
                " subi    3, 3, 1\n"
97
                " subi    3, 3, 1\n"
95
                " blr\n"
98
                " blr\n"
96
        );
99
        );
97
}
100
}
-
 
101
#pragma GCC diagnostic pop
98
102
99
void clearbufbyte(void *d, int32_t c, int32_t a)
103
void clearbufbyte(void *d, int32_t c, int32_t a)
100
{
104
{
101
        if (a==0) {
105
        if (a==0) {
102
                uint8_t *dd = (uint8_t*)d;
106
                uint8_t *dd = (uint8_t*)d;