Using a wrong tense with a counterfactual condition
If he would/’d have asked me, I would/’d stay.
If he had/’d asked me, I would/’d have stayed.
Express a counterfactual (that didn’t happen) condition by the past perfect and use the past conditional in the main clause. This use of the past perfect doesn’t indicate a time but an impossible happening.