| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 return ((instr & Imm24Mask) << 8) >> 6; | 361 return ((instr & Imm24Mask) << 8) >> 6; |
| 362 } | 362 } |
| 363 | 363 |
| 364 | 364 |
| 365 bool Assembler::IsLdrRegisterImmediate(Instr instr) { | 365 bool Assembler::IsLdrRegisterImmediate(Instr instr) { |
| 366 return (instr & (B27 | B26 | B25 | B22 | B20)) == (B26 | B20); | 366 return (instr & (B27 | B26 | B25 | B22 | B20)) == (B26 | B20); |
| 367 } | 367 } |
| 368 | 368 |
| 369 | 369 |
| 370 int Assembler::GetLdrRegisterImmediateOffset(Instr instr) { | 370 int Assembler::GetLdrRegisterImmediateOffset(Instr instr) { |
| 371 ASSERT(IsLDRRegisterImmediate(instr)); | 371 ASSERT(IsLdrRegisterImmediate(instr)); |
| 372 bool positive = (instr & B23) == B23; | 372 bool positive = (instr & B23) == B23; |
| 373 int offset = instr & Off12Mask; // Zero extended offset. | 373 int offset = instr & Off12Mask; // Zero extended offset. |
| 374 return positive ? offset : -offset; | 374 return positive ? offset : -offset; |
| 375 } | 375 } |
| 376 | 376 |
| 377 | 377 |
| 378 Instr Assembler::SetLdrRegisterImmediateOffset(Instr instr, int offset) { | 378 Instr Assembler::SetLdrRegisterImmediateOffset(Instr instr, int offset) { |
| 379 ASSERT(IsLDRRegisterImmediate(instr)); | 379 ASSERT(IsLdrRegisterImmediate(instr)); |
| 380 bool positive = offset >= 0; | 380 bool positive = offset >= 0; |
| 381 if (!positive) offset = -offset; | 381 if (!positive) offset = -offset; |
| 382 ASSERT(is_uint12(offset)); | 382 ASSERT(is_uint12(offset)); |
| 383 // Set bit indicating whether the offset should be added. | 383 // Set bit indicating whether the offset should be added. |
| 384 instr = (instr & ~B23) | (positive ? B23 : 0); | 384 instr = (instr & ~B23) | (positive ? B23 : 0); |
| 385 // Set the actual offset. | 385 // Set the actual offset. |
| 386 return (instr & ~Off12Mask) | offset; | 386 return (instr & ~Off12Mask) | offset; |
| 387 } | 387 } |
| 388 | 388 |
| 389 | 389 |
| (...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2001 bind(&after_pool); | 2001 bind(&after_pool); |
| 2002 } | 2002 } |
| 2003 | 2003 |
| 2004 // Since a constant pool was just emitted, move the check offset forward by | 2004 // Since a constant pool was just emitted, move the check offset forward by |
| 2005 // the standard interval. | 2005 // the standard interval. |
| 2006 next_buffer_check_ = pc_offset() + kCheckConstInterval; | 2006 next_buffer_check_ = pc_offset() + kCheckConstInterval; |
| 2007 } | 2007 } |
| 2008 | 2008 |
| 2009 | 2009 |
| 2010 } } // namespace v8::internal | 2010 } } // namespace v8::internal |
| OLD | NEW |