Merge jdk7u25-b33 into jdk7u25-b34
diff --git a/.hgtags-top-repo b/.hgtags-top-repo
index 2e96683..15e9837 100644
--- a/.hgtags-top-repo
+++ b/.hgtags-top-repo
@@ -281,3 +281,4 @@
 9de1fc3635def64c19c51f272f09b51d8cf0ca98 jdk7u25-b14
 2197dde877124579204c5266fa9d89166760b44f jdk7u25-b15
 eeb29025d52ab4ea9bc4f5afa37c3a4fbcaf0011 jdk7u25-b31
+e571b5c75bd194c1aaad6e8e75b1d40f6208391c jdk7u25-b33
diff --git a/corba/.hgtags b/corba/.hgtags
index a6e63ed..6ec2c0d 100644
--- a/corba/.hgtags
+++ b/corba/.hgtags
@@ -283,3 +283,4 @@
 577c4dd1a6e9bc1bb2c2e5d5ecbab8eacb4121af jdk7u25-b14
 4fde7ac2ecf4b170022ebbf8a961e6dbb229ccab jdk7u25-b15
 ddff7b2f69faaa8883e3986447daeab289f25e03 jdk7u25-b31
+9e2247c5d4b82798d393daf4e50cbadcaf0dc844 jdk7u25-b33
diff --git a/hotspot/.hgtags b/hotspot/.hgtags
index 34ac07c..de7b941 100644
--- a/hotspot/.hgtags
+++ b/hotspot/.hgtags
@@ -404,3 +404,4 @@
 4fafaf293aa5666e8c9f5ca1d96c3f752305f586 jdk7u25-b14
 40acb370626fbc439e4cfed8854960a83a376fba jdk7u25-b15
 73863f836e343b4b8e3f018e5e8f7f1618529096 jdk7u25-b31
+dd9090ad552134cbb20d5dfc89f682f55e2570e9 jdk7u25-b33
diff --git a/hotspot/make/hotspot_version b/hotspot/make/hotspot_version
index e125187..afbc2d4 100644
--- a/hotspot/make/hotspot_version
+++ b/hotspot/make/hotspot_version
@@ -35,7 +35,7 @@
 
 HS_MAJOR_VER=23
 HS_MINOR_VER=25
-HS_BUILD_NUMBER=02
+HS_BUILD_NUMBER=03
 
 JDK_MAJOR_VER=1
 JDK_MINOR_VER=7
diff --git a/hotspot/src/share/vm/opto/output.cpp b/hotspot/src/share/vm/opto/output.cpp
index e32a185..b3c1cb7 100644
--- a/hotspot/src/share/vm/opto/output.cpp
+++ b/hotspot/src/share/vm/opto/output.cpp
@@ -449,6 +449,17 @@
       int max_loop_pad = nb->code_alignment()-relocInfo::addr_unit();
       if (max_loop_pad > 0) {
         assert(is_power_of_2(max_loop_pad+relocInfo::addr_unit()), "");
+        // Adjust last_call_adr and/or last_avoid_back_to_back_adr.
+        // If either is the last instruction in this block, bump by
+        // max_loop_pad in lock-step with blk_size, so sizing
+        // calculations in subsequent blocks still can conservatively
+        // detect that it may the last instruction in this block.
+        if (last_call_adr == blk_starts[i]+blk_size) {
+          last_call_adr += max_loop_pad;
+        }
+        if (last_avoid_back_to_back_adr == blk_starts[i]+blk_size) {
+          last_avoid_back_to_back_adr += max_loop_pad;
+        }
         blk_size += max_loop_pad;
       }
     }
@@ -1194,8 +1205,6 @@
   int last_call_offset = -1;
   int last_avoid_back_to_back_offset = -1;
 #ifdef ASSERT
-  int block_alignment_padding = 0;
-
   uint* jmp_target = NEW_RESOURCE_ARRAY(uint,nblocks);
   uint* jmp_offset = NEW_RESOURCE_ARRAY(uint,nblocks);
   uint* jmp_size   = NEW_RESOURCE_ARRAY(uint,nblocks);
@@ -1229,8 +1238,6 @@
   Node *delay_slot = NULL;
 
   for (uint i=0; i < nblocks; i++) {
-    guarantee(blk_starts[i] >= (uint)cb->insts_size(),"should not increase size");
-
     Block *b = _cfg->_blocks[i];
 
     Node *head = b->head();
@@ -1251,14 +1258,6 @@
     jmp_offset[i] = 0;
     jmp_size[i]   = 0;
     jmp_rule[i]   = 0;
-
-    // Maximum alignment padding for loop block was used
-    // during first round of branches shortening, as result
-    // padding for nodes (sfpt after call) was not added.
-    // Take this into account for block's size change check
-    // and allow increase block's size by the difference
-    // of maximum and actual alignment paddings.
-    int orig_blk_size = blk_starts[i+1] - blk_starts[i] + block_alignment_padding;
 #endif
     int blk_offset = current_offset;
 
@@ -1558,8 +1557,6 @@
       }
 
     } // End for all instructions in block
-    assert((uint)blk_offset <= blk_starts[i], "shouldn't increase distance");
-    blk_starts[i] = blk_offset;
 
     // If the next block is the top of a loop, pad this block out to align
     // the loop top a little. Helps prevent pipe stalls at loop back branches.
@@ -1573,16 +1570,13 @@
         nop->emit(*cb, _regalloc);
         current_offset = cb->insts_size();
       }
-#ifdef ASSERT
-      int max_loop_pad = nb->code_alignment()-relocInfo::addr_unit();
-      block_alignment_padding = (max_loop_pad - padding);
-      assert(block_alignment_padding >= 0, "sanity");
-#endif
     }
     // Verify that the distance for generated before forward
     // short branches is still valid.
-    assert(orig_blk_size >= (current_offset - blk_offset), "shouldn't increase block size");
+    guarantee((int)(blk_starts[i+1] - blk_starts[i]) >= (current_offset - blk_offset), "shouldn't increase block size");
 
+    // Save new block start offset
+    blk_starts[i] = blk_offset;
   } // End of for all blocks
   blk_starts[nblocks] = current_offset;
 
diff --git a/jaxp/.hgtags b/jaxp/.hgtags
index 6490dd1..ebb20c7 100644
--- a/jaxp/.hgtags
+++ b/jaxp/.hgtags
@@ -283,3 +283,4 @@
 68cc0d2a49f09b5c611b2775f2e66de1022bdedc jdk7u25-b14
 503f75b55b34ae22f43b2992b1e56c96e35a60de jdk7u25-b15
 35710c8bd73dbfdd4805e8b3c506f500daf553c7 jdk7u25-b31
+c02dbd8fd8ca142e3987537f7ac43da361fcf9d4 jdk7u25-b33
diff --git a/jaxws/.hgtags b/jaxws/.hgtags
index d59448f..fb04a37 100644
--- a/jaxws/.hgtags
+++ b/jaxws/.hgtags
@@ -283,3 +283,4 @@
 03073e4e6d3f600102d31e862154f56730838b11 jdk7u25-b14
 4a925430bf712d36abb78decda16e04da1b1f6bc jdk7u25-b15
 854a93cd1f89fad2abcbdb6d7935438da0f4afbf jdk7u25-b31
+5d090a0d278f2384cdaaa2d6e8cea4fe30aa6886 jdk7u25-b33
diff --git a/jdk/.hgtags b/jdk/.hgtags
index 425b7d5..5d0e80d 100644
--- a/jdk/.hgtags
+++ b/jdk/.hgtags
@@ -282,3 +282,4 @@
 a71103b8cbb155a4af136baaee4f4bdd30ee817c jdk7u25-b14
 e1768e2070c938ec97325ad48b0d281e3031a29c jdk7u25-b15
 40034a7b7dec4d984139e154008e82e35d0ed212 jdk7u25-b31
+4ed1ef559d7c0058991eaf7e069b851940be432c jdk7u25-b33
diff --git a/langtools/.hgtags b/langtools/.hgtags
index d9a8641..6573276 100644
--- a/langtools/.hgtags
+++ b/langtools/.hgtags
@@ -283,3 +283,4 @@
 3b8323e24a636ac0638604d19fc116eb0eef6cdb jdk7u25-b15
 a87ad97e80ae1861143b477d8a8990dc6ecc9173 jdk7u21-b50
 642f469e52174d47ddb745f7fcc44f80340986f5 jdk7u25-b31
+a825dd3a95fd77b891255e88e1a78f6a476a45b3 jdk7u25-b33