summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2015-01-07 11:01:50 +0100
committerWim Taymans <wtaymans@redhat.com>2015-01-07 11:01:50 +0100
commit200d91014bbf6f62a1f28ddafacef001afe67dd1 (patch)
tree24e5922e8beccd13c15e9c8fa4b4da3d584d8893
parentce950b150d55159ef052a378ef3c99fe1e9665c7 (diff)
svolume.orc: avoid parameter loading undefined behaviourwork
In some cases, depending on the instruction that performs the load, orc ignores the size of the parameter when loading it for the first time. Explicitly load the parameter into a temp to make sure it is loaded correctly, like we do for the 2ch case. See https://bugzilla.gnome.org/show_bug.cgi?id=742271
-rw-r--r--src/pulsecore/svolume.orc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pulsecore/svolume.orc b/src/pulsecore/svolume.orc
index 0edbefbde..f869893ba 100644
--- a/src/pulsecore/svolume.orc
+++ b/src/pulsecore/svolume.orc
@@ -45,13 +45,15 @@
.function pa_volume_s16ne_orc_1ch
.dest 2 samples int16_t
-.param 4 v int32_t
+.param 4 vols int32_t
+.temp 4 v
.temp 2 vh
.temp 4 s
.temp 4 mh
.temp 4 ml
.temp 4 signc
+loadpl v, vols
convuwl s, samples
x2 cmpgtsw signc, 0, s
x2 andw signc, signc, v