IRC channel logs

2024-03-20.log

back to list of logs

<ekaitz>hi! anyone knows if x86 or arm have an option stack like RISC-V assembler does?
<ekaitz>i'm talking about `.option norelax`
<ekaitz>and `.option push/pop`
<ekaitz>that kind of stuff
<Googulator>Is that a thing architecturally on RISC-V (i.e. there are opcodes in machine code corresponding to such statements)?
<Googulator>Or just an assembler feature
<Googulator>Some x86 assemblers certainly have `.pragma`
<ekaitz>assembler feature
<ekaitz> https://sourceware.org/binutils/docs-2.31/as/RISC_002dV_002dDirectives.html#RISC_002dV_002dDirectives
<ekaitz>it has some push/pop thing i need to understand better
<ekaitz>how does the push/pop system work? does it keep all the options in the stack plus the one I pushed?
<Googulator>I guess it's like pragma on x86 then
<ekaitz>and when I pop it just ignores?
<ekaitz>but pragma doesn't have this kind of push/pop thing, right?
<ekaitz>i'm thinking on the easiest way to implement this
<deesix>So, basically that allows saving and restoring three bool flags, right?
<ekaitz>deesix: yep
<ekaitz>so what should I do?
<ekaitz>make a small array of options, that is a char with some bits set or what?