From: Takayuki 'January June' Suwa Date: Tue, 27 Dec 2022 06:30:12 +0000 (+0900) Subject: xtensa: Generate density instructions in set_frame_ptr X-Git-Tag: basepoints/gcc-14~2306 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48a0e822666b79600cae7401f9a3e8cf16bc3fd1;p=thirdparty%2Fgcc.git xtensa: Generate density instructions in set_frame_ptr gcc/ChangeLog: * config/xtensa/xtensa.md (set_frame_ptr): Fix to reflect TARGET_DENSITY. --- diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md index a77d3285bad1..e72fd9ac3f61 100644 --- a/gcc/config/xtensa/xtensa.md +++ b/gcc/config/xtensa/xtensa.md @@ -2562,12 +2562,15 @@ "" { if (frame_pointer_needed) - return "mov\ta7, sp"; + return (TARGET_DENSITY ? "mov.n\ta7, sp" : "mov\ta7, sp"); return ""; } [(set_attr "type" "move") (set_attr "mode" "SI") - (set_attr "length" "3")]) + (set (attr "length") + (if_then_else (match_test "TARGET_DENSITY") + (const_int 2) + (const_int 3)))]) ;; Post-reload splitter to remove fp assignment when it's not needed. (define_split