I'm writing a HBC program (actually done with it, just trying to make sure it's as optimized as possible) that interacts with an external device. I need strict ordering for my load-store instructions. I'm changing bits in the Hollywood GPIO's, fyi.
Here's a snippet of code from the program
lwz r0, 0 (r11)
sync 0
ori r0, r0, XXXX #Set a bit in the register
stw r0, 0 (r11)
eieio
bl sub_routine
lwz r0, 0 (r11)
sync 0
rlwinm r0, r0, 0, XX, XX #Now remove the bit
stw r0, 0 (r11)
eieio
Sorry for the lack of detail, but I don't want to 'release' to much info before I decide to post my work entirely (it's sort of useless but still...). I essentially have to do a lot of these load-store combos (via various bits) with the GPIO. I was wondering if there is a better way to enforce ordering like 'globally' if that makes any sense... I don't like the idea of having to sync after every load and eieio after every store.
In the Broadway manual, I found this .. "If store gathering is enabled and the stores do not fall under the above categories, an eieio or sync construction must be used to prevent 2 stores from being gathered ... ... ... "
My stores do not fit in the category that was listed above the quote. So wouldn't I be able to simply set bit 24 (store gathering enable) of HID0 to 0, then switch the bit back to 1 once I'm done with messing with the GPIOs?
Here's a snippet of code from the program
lwz r0, 0 (r11)
sync 0
ori r0, r0, XXXX #Set a bit in the register
stw r0, 0 (r11)
eieio
bl sub_routine
lwz r0, 0 (r11)
sync 0
rlwinm r0, r0, 0, XX, XX #Now remove the bit
stw r0, 0 (r11)
eieio
Sorry for the lack of detail, but I don't want to 'release' to much info before I decide to post my work entirely (it's sort of useless but still...). I essentially have to do a lot of these load-store combos (via various bits) with the GPIO. I was wondering if there is a better way to enforce ordering like 'globally' if that makes any sense... I don't like the idea of having to sync after every load and eieio after every store.
In the Broadway manual, I found this .. "If store gathering is enabled and the stores do not fall under the above categories, an eieio or sync construction must be used to prevent 2 stores from being gathered ... ... ... "
My stores do not fit in the category that was listed above the quote. So wouldn't I be able to simply set bit 24 (store gathering enable) of HID0 to 0, then switch the bit back to 1 once I'm done with messing with the GPIOs?