Accumulate all even and odd pixels fails
I have been playing around with orc and have come across a problem. The following code should accumulate all even and odd pixels of an grey image. Unfortunately, only the generated backup code works correctly (test fails). Tested on x86 with orc 0.4.32. This seems to be a bug. Am I wrong?
.function acc_even_odd_fail
.accumulator 4 acc_1 guint32
.accumulator 4 acc_2 guint32
.source 2 src_u8 guint8
.temp 4 src_u16 guint16
.temp 8 src_u32 guint32
.temp 4 src1_u32 guint32
.temp 4 src2_u32 guint32
x2 convubw src_u16, src_u8
x2 convuwl src_u32, src_u16
splitql src2_u32, src1_u32, src_u32
accl acc_1, src1_u32
accl acc_2, src2_u32
Simple hack is to splitlw the src_u16 and convert each result to a 32 bit uint instead of splitql src_u32:
.function acc_even_odd_win
.accumulator 4 acc_1 guint32
.accumulator 4 acc_2 guint32
.source 2 src_u8 guint8
.temp 4 src_u16 guint16
.temp 2 src1_u16 guint16
.temp 2 src2_u16 guint16
.temp 4 src1_u32 guint32
.temp 4 src2_u32 guint32
x2 convubw src_u16, src_u8
splitlw src2_u16, src1_u16, src_u16
convuwl src1_u32, src1_u16
convuwl src2_u32, src2_u16
accl acc_1, src1_u32
accl acc_2, src2_u32
Edited by Daniel Knobe