opcodes.h   opcodes.h 
UNARY_SB(absb, "ORC_ABS(%s)") UNARY_SB(absb, "ORC_ABS(%s)")
BINARY_SB(addb, "%s + %s") BINARY_SB(addb, "%s + %s")
BINARY_SB(addssb, "ORC_CLAMP_SB(%s + %s)") BINARY_SB(addssb, "ORC_CLAMP_SB(%s + %s)")
BINARY_UB(addusb, "ORC_CLAMP_UB((uint8_t)%s + (uint8_t)%s)") BINARY_UB(addusb, "ORC_CLAMP_UB((uint8_t)%s + (uint8_t)%s)")
BINARY_SB(andb, "%s & %s") BINARY_SB(andb, "%s & %s")
BINARY_SB(andnb, "%s & (~%s)") BINARY_SB(andnb, "(~%s) & %s")
BINARY_SB(avgsb, "(%s + %s + 1)>>1") BINARY_SB(avgsb, "(%s + %s + 1)>>1")
BINARY_UB(avgub, "((uint8_t)%s + (uint8_t)%s + 1)>>1") BINARY_UB(avgub, "((uint8_t)%s + (uint8_t)%s + 1)>>1")
BINARY_SB(cmpeqb, "(%s == %s) ? (~0) : 0") BINARY_SB(cmpeqb, "(%s == %s) ? (~0) : 0")
BINARY_SB(cmpgtsb, "(%s > %s) ? (~0) : 0") BINARY_SB(cmpgtsb, "(%s > %s) ? (~0) : 0")
UNARY_SB(copyb, "%s") UNARY_SB(copyb, "%s")
BINARY_SB(maxsb, "ORC_MAX(%s, %s)") BINARY_SB(maxsb, "ORC_MAX(%s, %s)")
BINARY_UB(maxub, "ORC_MAX(%s, %s)") BINARY_UB(maxub, "ORC_MAX((uint8_t)%s, (uint8_t)%s)")
BINARY_SB(minsb, "ORC_MIN(%s, %s)") BINARY_SB(minsb, "ORC_MIN(%s, %s)")
BINARY_UB(minub, "ORC_MIN(%s, %s)") BINARY_UB(minub, "ORC_MIN((uint8_t)%s, (uint8_t)%s)")
BINARY_SB(mullb, "(%s * %s) & 0xff") BINARY_SB(mullb, "(%s * %s) & 0xff")
BINARY_SB(mulhsb, "(%s * %s) >> 8") BINARY_SB(mulhsb, "(%s * %s) >> 8")
BINARY_UB(mulhub, "(%s * %s) >> 8") BINARY_UB(mulhub, "((uint32_t)(uint8_t)%s * (uint32_t)(uint8_t)%s) >> 8")
BINARY_SB(orb, "%s | %s") BINARY_SB(orb, "%s | %s")
BINARY_SB(shlb, "%s << %s") BINARY_SB(shlb, "%s << %s")
BINARY_SB(shrsb, "%s >> %s") BINARY_SB(shrsb, "%s >> %s")
BINARY_UB(shrub, "((uint8_t)%s) >> %s") BINARY_UB(shrub, "((uint8_t)%s) >> %s")
UNARY_SB(signb, "ORC_CLAMP(%s,-1,1)") UNARY_SB(signb, "ORC_CLAMP(%s,-1,1)")
BINARY_SB(subb, "%s - %s") BINARY_SB(subb, "%s - %s")
BINARY_SB(subssb, "ORC_CLAMP_SB(%s - %s)") BINARY_SB(subssb, "ORC_CLAMP_SB(%s - %s)")
BINARY_UB(subusb, "ORC_CLAMP_UB((uint8_t)%s - (uint8_t)%s)") BINARY_UB(subusb, "ORC_CLAMP_UB((uint8_t)%s - (uint8_t)%s)")
BINARY_SB(xorb, "%s ^ %s") BINARY_SB(xorb, "%s ^ %s")
UNARY_SW(absw, "ORC_ABS(%s)") UNARY_SW(absw, "ORC_ABS(%s)")
BINARY_SW(addw, "%s + %s") BINARY_SW(addw, "%s + %s")
BINARY_SW(addssw, "ORC_CLAMP_SW(%s + %s)") BINARY_SW(addssw, "ORC_CLAMP_SW(%s + %s)")
BINARY_UW(addusw, "ORC_CLAMP_UW((uint16_t)%s + (uint16_t)%s)") BINARY_UW(addusw, "ORC_CLAMP_UW((uint16_t)%s + (uint16_t)%s)")
BINARY_SW(andw, "%s & %s") BINARY_SW(andw, "%s & %s")
BINARY_SW(andnw, "%s & (~%s)") BINARY_SW(andnw, "(~%s) & %s")
BINARY_SW(avgsw, "(%s + %s + 1)>>1") BINARY_SW(avgsw, "(%s + %s + 1)>>1")
BINARY_UW(avguw, "((uint16_t)%s + (uint16_t)%s + 1)>>1") BINARY_UW(avguw, "((uint16_t)%s + (uint16_t)%s + 1)>>1")
BINARY_SW(cmpeqw, "(%s == %s) ? (~0) : 0") BINARY_SW(cmpeqw, "(%s == %s) ? (~0) : 0")
BINARY_SW(cmpgtsw, "(%s > %s) ? (~0) : 0") BINARY_SW(cmpgtsw, "(%s > %s) ? (~0) : 0")
UNARY_SW(copyw, "%s") UNARY_SW(copyw, "%s")
BINARY_SW(maxsw, "ORC_MAX(%s, %s)") BINARY_SW(maxsw, "ORC_MAX(%s, %s)")
BINARY_UW(maxuw, "ORC_MAX(%s, %s)") BINARY_UW(maxuw, "ORC_MAX((uint16_t)%s, (uint16_t)%s)")
BINARY_SW(minsw, "ORC_MIN(%s, %s)") BINARY_SW(minsw, "ORC_MIN(%s, %s)")
BINARY_UW(minuw, "ORC_MIN(%s, %s)") BINARY_UW(minuw, "ORC_MIN((uint16_t)%s, (uint16_t)%s)")
BINARY_SW(mullw, "(%s * %s) & 0xffff") BINARY_SW(mullw, "(%s * %s) & 0xffff")
BINARY_SW(mulhsw, "(%s * %s) >> 16") BINARY_SW(mulhsw, "(%s * %s) >> 16")
BINARY_UW(mulhuw, "(%s * %s) >> 16") BINARY_UW(mulhuw, "((uint32_t)((uint16_t)%s) * (uint32_t)((uint16_t)%s)) >> 16")
BINARY_SW(orw, "%s | %s") BINARY_SW(orw, "%s | %s")
BINARY_SW(shlw, "%s << %s") BINARY_SW(shlw, "%s << %s")
BINARY_SW(shrsw, "%s >> %s") BINARY_SW(shrsw, "%s >> %s")
BINARY_UW(shruw, "%s >> %s") BINARY_UW(shruw, "((uint16_t)%s) >> %s")
UNARY_SW(signw, "ORC_CLAMP(%s,-1,1)") UNARY_SW(signw, "ORC_CLAMP(%s,-1,1)")
BINARY_SW(subw, "%s - %s") BINARY_SW(subw, "%s - %s")
BINARY_SW(subssw, "ORC_CLAMP_SW(%s - %s)") BINARY_SW(subssw, "ORC_CLAMP_SW(%s - %s)")
BINARY_UW(subusw, "ORC_CLAMP_UW((uint16_t)%s - (uint16_t)%s)") BINARY_UW(subusw, "ORC_CLAMP_UW((uint16_t)%s - (uint16_t)%s)")
BINARY_SW(xorw, "%s ^ %s") BINARY_SW(xorw, "%s ^ %s")
UNARY_SL(absl, "ORC_ABS(%s)") UNARY_SL(absl, "ORC_ABS(%s)")
BINARY_SL(addl, "%s + %s") BINARY_SL(addl, "%s + %s")
BINARY_SL(addssl, "ORC_CLAMP_SL((int64_t)%s + (int64_t)%s)") BINARY_SL(addssl, "ORC_CLAMP_SL((int64_t)%s + (int64_t)%s)")
BINARY_UL(addusl, "ORC_CLAMP_UL((uint64_t)%s + (uint64_t)%s)") BINARY_UL(addusl, "ORC_CLAMP_UL((int64_t)(uint32_t)%s + (int64_t)(uint32_t) %s)")
BINARY_SL(andl, "%s & %s") BINARY_SL(andl, "%s & %s")
BINARY_SL(andnl, "%s & (~%s)") BINARY_SL(andnl, "(~%s) & %s")
BINARY_SL(avgsl, "(%s + %s + 1)>>1") BINARY_SL(avgsl, "((int64_t)%s + (int64_t)%s + 1)>>1")
BINARY_UL(avgul, "((uint32_t)%s + (uint32_t)%s + 1)>>1") BINARY_UL(avgul, "((uint64_t)(uint32_t)%s + (uint64_t)(uint32_t)%s + 1)>>1"
)
BINARY_SL(cmpeql, "(%s == %s) ? (~0) : 0") BINARY_SL(cmpeql, "(%s == %s) ? (~0) : 0")
BINARY_SL(cmpgtsl, "(%s > %s) ? (~0) : 0") BINARY_SL(cmpgtsl, "(%s > %s) ? (~0) : 0")
UNARY_SL(copyl, "%s") UNARY_SL(copyl, "%s")
BINARY_SL(maxsl, "ORC_MAX(%s, %s)") BINARY_SL(maxsl, "ORC_MAX(%s, %s)")
BINARY_UL(maxul, "ORC_MAX(%s, %s)") BINARY_UL(maxul, "ORC_MAX((uint32_t)%s, (uint32_t)%s)")
BINARY_SL(minsl, "ORC_MIN(%s, %s)") BINARY_SL(minsl, "ORC_MIN(%s, %s)")
BINARY_UL(minul, "ORC_MIN(%s, %s)") BINARY_UL(minul, "ORC_MIN((uint32_t)%s, (uint32_t)%s)")
BINARY_SL(mulll, "(%s * %s) & 0xffffffff") BINARY_SL(mulll, "(%s * %s) & 0xffffffff")
BINARY_SL(mulhsl, "((int64_t)%s * (int64_t)%s) >> 32") BINARY_SL(mulhsl, "((int64_t)%s * (int64_t)%s) >> 32")
BINARY_UL(mulhul, "((uint64_t)%s * (uint64_t)%s) >> 32") BINARY_UL(mulhul, "((uint64_t)%s * (uint64_t)%s) >> 32")
BINARY_SL(orl, "%s | %s") BINARY_SL(orl, "%s | %s")
BINARY_SL(shll, "%s << %s") BINARY_SL(shll, "%s << %s")
BINARY_SL(shrsl, "%s >> %s") BINARY_SL(shrsl, "%s >> %s")
BINARY_UL(shrul, "((uint32_t)%s) >> %s") BINARY_UL(shrul, "((uint32_t)%s) >> %s")
UNARY_SL(signl, "ORC_CLAMP(%s,-1,1)") UNARY_SL(signl, "ORC_CLAMP(%s,-1,1)")
BINARY_SL(subl, "%s - %s") BINARY_SL(subl, "%s - %s")
BINARY_SL(subssl, "ORC_CLAMP_SL((int64_t)%s - (int64_t)%s)") BINARY_SL(subssl, "ORC_CLAMP_SL((int64_t)%s - (int64_t)%s)")
BINARY_UL(subusl, "ORC_CLAMP_UL((uint64_t)%s - (uint64_t)%s)") BINARY_UL(subusl, "ORC_CLAMP_UL((int64_t)(uint32_t)%s - (int64_t)(uint32_t) %s)")
BINARY_SL(xorl, "%s ^ %s") BINARY_SL(xorl, "%s ^ %s")
UNARY_BW(convsbw, "%s") UNARY_BW(convsbw, "%s")
UNARY_BW(convubw, "(uint8_t)%s") UNARY_BW(convubw, "(uint8_t)%s")
UNARY_WL(convswl, "%s") UNARY_WL(convswl, "%s")
UNARY_WL(convuwl, "(uint16_t)%s") UNARY_WL(convuwl, "(uint16_t)%s")
UNARY_WB(convwb, "%s") UNARY_WB(convwb, "%s")
UNARY_WB(convssswb, "ORC_CLAMP_SB(%s)") UNARY_WB(convssswb, "ORC_CLAMP_SB(%s)")
UNARY_WB(convsuswb, "ORC_CLAMP_UB(%s)") UNARY_WB(convsuswb, "ORC_CLAMP_UB(%s)")
UNARY_WB(convusswb, "ORC_CLAMP_SB(%s)") UNARY_WB(convusswb, "ORC_CLAMP_SB((uint16_t)%s)")
UNARY_WB(convuuswb, "ORC_CLAMP_UB(%s)") UNARY_WB(convuuswb, "ORC_CLAMP_UB((uint16_t)%s)")
UNARY_LW(convlw, "%s") UNARY_LW(convlw, "%s")
UNARY_LW(convssslw, "ORC_CLAMP_SW(%s)") UNARY_LW(convssslw, "ORC_CLAMP_SW(%s)")
UNARY_LW(convsuslw, "ORC_CLAMP_UW(%s)") UNARY_LW(convsuslw, "ORC_CLAMP_UW(%s)")
UNARY_LW(convusslw, "ORC_CLAMP_SW(%s)") UNARY_LW(convusslw, "ORC_CLAMP_SW((uint32_t)%s)")
UNARY_LW(convuuslw, "ORC_CLAMP_UW(%s)") UNARY_LW(convuuslw, "ORC_CLAMP_UW((uint32_t)%s)")
BINARY_BW(mulsbw, "%s * %s") BINARY_BW(mulsbw, "%s * %s")
BINARY_BW(mulubw, "(uint8_t)%s * (uint8_t)%s") BINARY_BW(mulubw, "(uint8_t)%s * (uint8_t)%s")
BINARY_WL(mulswl, "%s * %s") BINARY_WL(mulswl, "%s * %s")
BINARY_WL(muluwl, "(uint16_t)%s * (uint16_t)%s") BINARY_WL(muluwl, "(uint16_t)%s * (uint16_t)%s")
BINARY_WL(mergewl, "((uint16_t)%s) | ((uint16_t)%s << 16)") BINARY_WL(mergewl, "((uint16_t)%s) | ((uint16_t)%s << 16)")
BINARY_BW(mergebw, "((uint8_t)%s) | ((uint8_t)%s << 8)") BINARY_BW(mergebw, "((uint8_t)%s) | ((uint8_t)%s << 8)")
UNARY_WB(select0wb, "(uint16_t)%s & 0xff") UNARY_WB(select0wb, "(uint16_t)%s & 0xff")
UNARY_WB(select1wb, "((uint16_t)%s >> 8)&0xff") UNARY_WB(select1wb, "((uint16_t)%s >> 8)&0xff")
 End of changes. 16 change blocks. 
20 lines changed or deleted 21 lines changed or added


 orc-stdint.h   orc-stdint.h 
#ifndef _ORC_ORC_ORC_STDINT_H #ifndef _ORC_ORC_ORC_STDINT_H
#define _ORC_ORC_ORC_STDINT_H 1 #define _ORC_ORC_ORC_STDINT_H 1
#ifndef _GENERATED_STDINT_H #ifndef _GENERATED_STDINT_H
#define _GENERATED_STDINT_H "orc 0.4.1" #define _GENERATED_STDINT_H "orc 0.4.2"
/* generated using gnu compiler gcc (SUSE Linux) 4.4.1 [gcc-4_4-branch revi sion 150839] */ /* generated using gnu compiler gcc (SUSE Linux) 4.4.1 [gcc-4_4-branch revi sion 150839] */
#define _STDINT_HAVE_STDINT_H 1 #define _STDINT_HAVE_STDINT_H 1
#include <stdint.h> #include <stdint.h>
#endif #endif
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 orcprogram.h   orcprogram.h 
skipping to change at line 63 skipping to change at line 63
#define ORC_ENABLE_ASM_CODE #define ORC_ENABLE_ASM_CODE
#ifdef ORC_ENABLE_ASM_CODE #ifdef ORC_ENABLE_ASM_CODE
#define ORC_ASM_CODE(compiler,...) orc_compiler_append_code(compiler, __VA_ ARGS__) #define ORC_ASM_CODE(compiler,...) orc_compiler_append_code(compiler, __VA_ ARGS__)
#else #else
#define ORC_ASM_CODE(compiler,...) #define ORC_ASM_CODE(compiler,...)
#endif #endif
#define ORC_PROGRAM_ERROR(program, ...) do { \ #define ORC_PROGRAM_ERROR(program, ...) do { \
program->error = TRUE; \ program->error = TRUE; \
orc_debug_print(ORC_DEBUG_ERROR, __FILE__, ORC_FUNCTION, __LINE__, __VA_A RGS__); \ orc_debug_print(ORC_DEBUG_WARNING, __FILE__, ORC_FUNCTION, __LINE__, __VA _ARGS__); \
} while (0) } while (0)
#define ORC_COMPILER_ERROR(compiler, ...) do { \ #define ORC_COMPILER_ERROR(compiler, ...) do { \
compiler->error = TRUE; \ compiler->error = TRUE; \
compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; \ compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; \
orc_debug_print(ORC_DEBUG_ERROR, __FILE__, ORC_FUNCTION, __LINE__, __VA_A RGS__); \ orc_debug_print(ORC_DEBUG_WARNING, __FILE__, ORC_FUNCTION, __LINE__, __VA _ARGS__); \
} while (0) } while (0)
enum { enum {
ORC_TARGET_C_C99 = (1<<0), ORC_TARGET_C_C99 = (1<<0),
ORC_TARGET_C_BARE = (1<<1) ORC_TARGET_C_BARE = (1<<1)
}; };
enum { enum {
ORC_TARGET_ALTIVEC_ALTIVEC = (1<<0) ORC_TARGET_ALTIVEC_ALTIVEC = (1<<0)
}; };
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 orctest.h   orctest.h 
skipping to change at line 20 skipping to change at line 20
typedef enum { typedef enum {
ORC_TEST_FAILED = 0, ORC_TEST_FAILED = 0,
ORC_TEST_INDETERMINATE = 1, ORC_TEST_INDETERMINATE = 1,
ORC_TEST_OK = 2 ORC_TEST_OK = 2
} OrcTestResult; } OrcTestResult;
void orc_test_init (void); void orc_test_init (void);
OrcTestResult orc_test_gcc_compile (OrcProgram *p); OrcTestResult orc_test_gcc_compile (OrcProgram *p);
void orc_test_random_bits (void *data, int n_bytes); void orc_test_random_bits (void *data, int n_bytes);
OrcTestResult orc_test_compare_output (OrcProgram *program); OrcTestResult orc_test_compare_output (OrcProgram *program);
OrcTestResult orc_test_compare_output_backup (OrcProgram *program);
OrcProgram *orc_test_get_program_for_opcode (OrcStaticOpcode *opcode); OrcProgram *orc_test_get_program_for_opcode (OrcStaticOpcode *opcode);
OrcProgram *orc_test_get_program_for_opcode_const (OrcStaticOpcode *opcode) ; OrcProgram *orc_test_get_program_for_opcode_const (OrcStaticOpcode *opcode) ;
OrcProgram *orc_test_get_program_for_opcode_param (OrcStaticOpcode *opcode) ; OrcProgram *orc_test_get_program_for_opcode_param (OrcStaticOpcode *opcode) ;
ORC_END_DECLS ORC_END_DECLS
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/