| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 __ bind(&fallthrough); | 238 __ bind(&fallthrough); |
| 239 } | 239 } |
| 240 | 240 |
| 241 | 241 |
| 242 void RegExpMacroAssemblerIA32::CheckNotCharacter(uc16 c, Label* on_not_equal) { | 242 void RegExpMacroAssemblerIA32::CheckNotCharacter(uc16 c, Label* on_not_equal) { |
| 243 __ cmp(edx, c); | 243 __ cmp(edx, c); |
| 244 BranchOrBacktrack(not_equal, on_not_equal); | 244 BranchOrBacktrack(not_equal, on_not_equal); |
| 245 } | 245 } |
| 246 | 246 |
| 247 | 247 |
| 248 void RegExpMacroAssemblerIA32::CheckNotCharacterAfterOr(uc16 c, |
| 249 uc16 mask, |
| 250 Label* on_not_equal) { |
| 251 __ mov(eax, Operand(edx)); |
| 252 __ or_(eax, mask); |
| 253 __ cmp(eax, c); |
| 254 BranchOrBacktrack(not_equal, on_not_equal); |
| 255 } |
| 256 |
| 257 |
| 258 void RegExpMacroAssemblerIA32::CheckNotCharacterAfterMinusOr( |
| 259 uc16 c, |
| 260 uc16 mask, |
| 261 Label* on_not_equal) { |
| 262 __ lea(eax, Operand(edx, -mask)); |
| 263 __ or_(eax, mask); |
| 264 __ cmp(eax, c); |
| 265 BranchOrBacktrack(not_equal, on_not_equal); |
| 266 } |
| 267 |
| 268 |
| 248 void RegExpMacroAssemblerIA32::DispatchHalfNibbleMap( | 269 void RegExpMacroAssemblerIA32::DispatchHalfNibbleMap( |
| 249 uc16 start, | 270 uc16 start, |
| 250 Label* half_nibble_map, | 271 Label* half_nibble_map, |
| 251 const Vector<Label*>& destinations) { | 272 const Vector<Label*>& destinations) { |
| 252 ReadCurrentChar(eax); | 273 ReadCurrentChar(eax); |
| 253 __ sub(Operand(eax), Immediate(start)); | 274 __ sub(Operand(eax), Immediate(start)); |
| 254 | 275 |
| 255 __ mov(ecx, eax); | 276 __ mov(ecx, eax); |
| 256 __ shr(eax, 2); | 277 __ shr(eax, 2); |
| 257 // FIXME: ecx must hold address of map | 278 // FIXME: ecx must hold address of map |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 | 596 |
| 576 | 597 |
| 577 void RegExpMacroAssemblerIA32::LoadConstantBufferAddress(Register reg, | 598 void RegExpMacroAssemblerIA32::LoadConstantBufferAddress(Register reg, |
| 578 ArraySlice* buffer) { | 599 ArraySlice* buffer) { |
| 579 __ mov(reg, buffer->array()); | 600 __ mov(reg, buffer->array()); |
| 580 __ add(Operand(reg), Immediate(buffer->base_offset())); | 601 __ add(Operand(reg), Immediate(buffer->base_offset())); |
| 581 } | 602 } |
| 582 | 603 |
| 583 #undef __ | 604 #undef __ |
| 584 }} | 605 }} |
| OLD | NEW |