[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-smalltalk] About no_opt macro
From: |
Mathieu Suen |
Subject: |
[Help-smalltalk] About no_opt macro |
Date: |
Tue, 12 Oct 2010 14:28:18 +0100 (BST) |
Hi,
Will reading the vm.def, I cam across the no_opt macro.
I guess is to avoid some optimization but but what kind of optimization and why.
The macro is define as:
#define no_opt(x) ({ __typeof__ ((x)) _result; \
asm ("" : "=r" (_result) : "0" ((x))); _result; })
From what I understand is that it define a variable _result and force to move x
into _result.
The macro is used in tha bytecode PLUS_SPECIAL an MINUS SPECIAL ... :
intptr_t iresult = no_opt (iop1 + iop2);
Thanks for shading the light on this point.
-Mathk
- [Help-smalltalk] About no_opt macro,
Mathieu Suen <=