summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
diff options
context:
space:
mode:
authorCharles Davis <cdavis@mines.edu>2011-05-27 02:43:19 +0000
committerCharles Davis <cdavis@mines.edu>2011-05-27 02:43:19 +0000
commit761313b28dae4e35b3ea08b5943e92c682c997c5 (patch)
treeb421447843345bf35e7ff2bcb193f155b12ad767 /llvm/lib/MC
parent0cbb131d8bb5d4fc06ab37a6268984feb18223ee (diff)
downloadbcm5719-llvm-761313b28dae4e35b3ea08b5943e92c682c997c5.tar.gz
bcm5719-llvm-761313b28dae4e35b3ea08b5943e92c682c997c5.zip
Add missing break statements. Align UNWIND_INFO and RUNTIME_FUNCTION structs
to 4 bytes. I'm surprised no one caught the missing break statements. llvm-svn: 132176
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/MCWin64EH.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCWin64EH.cpp b/llvm/lib/MC/MCWin64EH.cpp
index fc394504bfb..2511e91b850 100644
--- a/llvm/lib/MC/MCWin64EH.cpp
+++ b/llvm/lib/MC/MCWin64EH.cpp
@@ -27,17 +27,21 @@ static uint8_t CountOfUnwindCodes(std::vector<MCWin64EHInstruction> &instArray){
case Win64EH::UOP_SetFPReg:
case Win64EH::UOP_PushMachFrame:
count += 1;
+ break;
case Win64EH::UOP_SaveNonVol:
case Win64EH::UOP_SaveXMM128:
count += 2;
+ break;
case Win64EH::UOP_SaveNonVolBig:
case Win64EH::UOP_SaveXMM128Big:
count += 3;
+ break;
case Win64EH::UOP_AllocLarge:
if (I->getSize() > 512*1024-8)
count += 3;
else
count += 2;
+ break;
}
}
return count;
@@ -113,6 +117,7 @@ static void EmitRuntimeFunction(MCStreamer &streamer,
const MCWin64EHUnwindInfo *info) {
MCContext &context = streamer.getContext();
+ streamer.EmitValueToAlignment(4);
streamer.EmitValue(MCSymbolRefExpr::Create(info->Begin, context), 4);
streamer.EmitValue(MCSymbolRefExpr::Create(info->End, context), 4);
streamer.EmitValue(MCSymbolRefExpr::Create(info->Symbol, context), 4);
@@ -123,6 +128,7 @@ static void EmitUnwindInfo(MCStreamer &streamer, MCWin64EHUnwindInfo *info) {
if (info->Symbol) return;
MCContext &context = streamer.getContext();
+ streamer.EmitValueToAlignment(4);
// Upper 3 bits are the version number (currently 1).
uint8_t flags = 0x20;
info->Symbol = context.CreateTempSymbol();
OpenPOWER on IntegriCloud