Hardware Support for Compiler Speculation Hardware support for - - PowerPoint PPT Presentation

hardware support for compiler speculation
SMART_READER_LITE
LIVE PREVIEW

Hardware Support for Compiler Speculation Hardware support for - - PowerPoint PPT Presentation

Hardware Support for Compiler Speculation Hardware support for preserving exception behavior ignore exception until instruction is no longer speculative handle resumable exceptions return undefined value for terminating exceptions


slide-1
SLIDE 1

Winter 2006 CSE 548 - Speculation & Exceptions 1

Hardware Support for Compiler Speculation

Hardware support for preserving exception behavior

  • ignore exception until instruction is no longer speculative
  • handle resumable exceptions
  • return undefined value for terminating exceptions
  • if wrong path, value ignored
  • if right path, program is incorrect & will generate incorrect

results

slide-2
SLIDE 2

Winter 2006 CSE 548 - Speculation & Exceptions 2

Hardware Support for Compiler Speculation

Hardware support for preserving exception behavior

  • handle a terminating exception only if the result is about to be used

by nonspeculative instruction

  • poison bit on each register; speculative bit in each instruction
  • poison bit of result register set if speculative instruction results

in terminating exception

  • a use of a poisoned result by a speculative instruction sets the

poison bit for its result

  • a use by nonspeculative instruction triggers exception handling
  • buffer results of speculative instructions until commit
slide-3
SLIDE 3

Winter 2006 CSE 548 - Speculation & Exceptions 3

Hardware Support for Compiler Speculation

Hardware support for memory reference speculation

  • “check load address” instruction
  • located where load used to be
  • hardware tracks if a store to this address
  • if yes, reload
  • might have to reexecute dependent instructions