RE: Need emit_expr to write right shifted value.

2023-06-22 Thread zac.walker
I saw that there is a define TC_PARSE_CONS_EXPRESSION that can be used to install a hook. I just wanted to make sure I was not missing something simpler. -Original Message- From: Adhemerval Zanella Netto Sent: Thursday, June 22, 2023 3:36 PM To: zac.wal...@linaro.org; linaro-toolchain@l

Re: Need emit_expr to write right shifted value.

2023-06-22 Thread Adhemerval Zanella Netto
On 22/06/23 10:18, zac.wal...@linaro.org wrote: > Hi, > > In binutils I need to write an offset between two symbols shifted right by 2 > bits. This offset is written to the xdata section. My > code currently looks like this: > > exp.X_op = O_subtract; > exp.X_add_symbol = symbol1; >

Need emit_expr to write right shifted value.

2023-06-22 Thread zac.walker
Hi, In binutils I need to write an offset between two symbols shifted right by 2 bits. This offset is written to the xdata section. My code currently looks like this: exp.X_op = O_subtract; exp.X_add_symbol = symbol1; exp.X_op_symbol = symbol2; emit_expr (&exp, 2); This works