[PATCH] [mips] Add assembler support for the .cprestore directive.

Toma Tabacu toma.tabacu at imgtec.com
Fri Nov 14 06:16:58 PST 2014


Hi dsanders,

This assembler directive is used in O32 PIC to restore the current function's $gp after executing JAL's. The $gp is first stored on the stack at a user-specified offset.

It has the following format: ".cprestore 8" (where 8 is the offset).

This also fixes http://llvm.org/bugs/show_bug.cgi?id=20967.

http://reviews.llvm.org/D6267

Files:
  lib/Target/Mips/AsmParser/MipsAsmParser.cpp
  lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
  lib/Target/Mips/MipsTargetStreamer.h
  test/MC/Mips/cprestore-bad.s
  test/MC/Mips/cprestore-noreorder.s
  test/MC/Mips/cprestore-reorder.s
  test/MC/Mips/cprestore-warning-unused.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6267.16208.patch
Type: text/x-patch
Size: 28637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141114/22f6efc7/attachment.bin>


More information about the llvm-commits mailing list