cosmopolitan/dsp/core/c121s.h

18 lines
384 B
C
Raw Normal View History

2020-06-15 14:18:57 +00:00
#ifndef COSMOPOLITAN_DSP_CORE_C121S_H_
#define COSMOPOLITAN_DSP_CORE_C121S_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
2023-06-09 13:41:34 +00:00
__funline signed char C121S(signed char al, signed char bl, signed char cl) {
short ax;
2020-06-15 14:18:57 +00:00
ax = al;
ax += bl;
ax += bl;
ax += cl;
ax += 2;
ax >>= 2;
return ax;
}
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_DSP_CORE_C121S_H_ */