Re: m68k/cpu32 TRAP instruction?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/4/18 11:01 AM, Josef Wolf wrote:
> On Thu, Oct 04, 2018 at 06:33:57AM -0600, Jeff Law wrote:
>> On 10/4/18 6:19 AM, Josef Wolf wrote:
>>> Why does gcc use those instructions? There is nothing special in the code
>>> which is now translated into those trap instructions. I don't use floating
>>> point at all, so I don't see any reason to use those instructions (and crash
>>> on them).
>>>
>> GCC will replace a NULL pointer dereference or division by zero with a
>> trap instruction.
> 
> Is this described somewhere? I am pretty much sure that there is no NULL
> pointer dereference and no division in this code. There must be something else.
You can use -fdump-tree-all-blocks-details and look at the
isolate-erroneous-paths dump file.  Those are the cases I'm aware of
where GCC will insert traps.




> 
> In addition, the crash disappears, when I insert some no-op function call at
> the beginning of one of those functions. This causes GCC to use other
> registers for local variables.
register allocation shouldn't have anything to do with whether or not
something gets translated into a trap.

jeff



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux