Does somebody interested in supporting old compilers? I see for example
our CI fails.
Changing to memcpy() has to work. If there there is interest I will send
clean patch for this.
odp_schedule_ordered.c: In function ‘schedule_order_lock’:
odp_schedule_ordered.c:787:1: error: unrecognizable insn:
}
^
(insn 75 23 76 5 (set (reg:SI 1 dx [+4 ])
(plus:SI (plus:SI (plus:SI (mult:SI (reg:SI 1 dx [66])
(const_int 8 [0x8]))
(unspec:SI [
(const_int 0 [0])
] UNSPEC_TP))
(reg:SI 0 ax [65]))
(const_int 12 [0xc]))) odp_schedule_ordered.c:774 -1
(nil))
odp_schedule_ordered.c:787:1: internal compiler error: in extract_insn,
at recog.c:2154
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
Preprocessed source stored into /tmp/cch3xTrW.out file, please attach
this to your bugreport.
ERROR: Cannot create report: [Errno 17] File exists:
'/var/crash/_usr_lib_gcc_x86_64-linux-gnu_4.8_cc1.0.crash'
+static uint64_t get_sync(unsigned lock_index)
+{
+ uint64_t val;
+
+ /* Fix gcc -m32 ERRATA
+ * https://bugzilla.redhat.com/show_bug.cgi?id=1212265
+ */
+ memcpy(&val, &sched_local.sync[lock_index], sizeof(uint64_t));
+ return val;
+}
+
void schedule_order_lock(unsigned lock_index)
{
queue_entry_t *origin_qe;
uint64_t sync, sync_out;
origin_qe = sched_local.origin_qe;
if (!origin_qe || lock_index >=
origin_qe->s.param.sched.lock_count)
return;
- sync = sched_local.sync[lock_index];
+ sync = get_sync(lock_index);
sync_out = odp_atomic_load_u64(&origin_qe->s.sync_out[lock_index]);
ODP_ASSERT(sync >= sync_out);
Best regards,
Maxim.