Skip to content

Commit

Permalink
fix(lexer): using a general macro for m1 target
Browse files Browse the repository at this point in the history
Signed-off-by: mlycore <maxwell92@126.com>
  • Loading branch information
mlycore committed Aug 13, 2022
1 parent 5d53163 commit 1016e3c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pisa-proxy/parser/mysql/src/lex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,8 @@ impl<'a> Scanner<'a> {

self.is_ident_dot = self.peek() == '.';

if cfg!(any(target_arch = "x86", target_arch = "x86_64")) {
if is_x86_feature_detected!("sse2") {
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
if is_x86_feature_detected!("sse2") {
unsafe {
to_upper(
&mut self.text[old_pos..self.pos].as_bytes(),
Expand All @@ -683,7 +683,6 @@ impl<'a> Scanner<'a> {
self.pos -= 1;
return Scanner::check_ident_return(ident_str, old_pos, length);
}
}
}

let ident_str = self.text[old_pos..self.pos].to_uppercase();
Expand Down

0 comments on commit 1016e3c

Please sign in to comment.