Injecting user defined opcode

Max Schneider king@greatfreeworld.org
Sun Jun 30 18:16:00 GMT 2019


00 is not an instruction. The machine will pull in the next byte and the next.... Then you will have the add instruction. And it will be executedOn Jun 30, 2019 13:13, Mahmood Naderan via gcc-help <gcc-help@gcc.gnu.org> wrote:
>
> >No.  That's not done by GCC or GNU as. 
> >It's how Intel/AMD CPU parses the machine code.  There are no "delimeters" in 
> >machine code so the CPU regards "00 5d c3" as an instruction.  objdump (from 
> >Binutils) just emulates the behavior of CPU. 
>
>
>
> But as you can see in the output of "disass /r main", it the GDB or GCC that forms such a machine code. CPU won't fetch any instruction until "run" command is used. Therefore, I think it is GCC or GDB that forms such a machine code. 
>
>
>
> Regards, 
> Mahmood 
>
>


More information about the Gcc-help mailing list