New volatility rules for optimiser

$XDATA and volatility

Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1408
Registered: 03 / 2005
Subject:

New volatility rules for optimiser

 · 
Posted: 01.08.2011 - 11:02  ·  #1
With the latest (just released) version of the optimiser volatility rules have changed for $XDATA.

Previously XDATA was considered non-volatile, but this caused a problem with memory mapped peripherals. Consequently XDATA is now assumed to be volatile, which is the safest option.

No existing programs should stop working as a consequence of this, but the optimisation might be poorer. To get around this some new flags have been introduced. They apply to all memory areas, not just XDATA.

To return to your previous optimising actions put the following switches around your XDATA areas:

Code
{$XDATA}
{$OPTI VOLATILE_OFF}
... // your data
{$OPTI VOLATILE_DFT}


This will return the xdata area to be treated as non-volatile.

Currently there are a few typos in the manual, but these will be corrected shortly. The three new switches are

{OPTI VOLATILE_ON}
Treat following variables as volatile.

{$OPTI VOLATILE_OFF}
Treat following variables as non-volatile

{$OPTI VOLOATILE_DFT}
Return to default methods.

ALWAYS terminate with a {$OPTI VOLATILE_DFT} directive.

Merlin.
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 13   36   49 · Page-Gen-Time: 0.037466s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI