In the other half of the draw, 18-year-old Canadian Denis Shapovalov has fought back from a set down to overcome Frenchman Adrian Mannarino 2-6 6-3 6-4 and become the youngest ever player to reach a Masters 1000 semi-final.
After surviving a tricky R16 test against Spain's David Ferrer, which he won after coming back from behind, the 36-year-old made light work of Roberto Bautista Agut 6-4, 6-4 in the quarter-final on Friday, August 11.
Federer advances to the semi-finals where he will face Robin Haase of the Netherlands who defeated Diego Schwartzman 4-6, 6-3, 6-3 earlier in the day.
He broke service for a 2-1 lead in the third set Friday only to hand it back in the next game, but a roar went up when Mannarino wasted a chance to put away a game point and Shapovalov jumped on the chance to break for a 5-4 lead.
Prior to this, the pair had met only once during a Davis Cup World Group play-off in 2012, when Federer clinched a 6-1, 6-4, 6-4 win.
For Federer, it was plain sailing against Bautista Agut, who is winless in seven matches against the Swiss maestro.
However, it will be an uphill task for Haase in the semi-final, given Federer commanding display at the hard court tournament so far. "Sometimes he tends to just roll the ball in and use the big serve, or he uses a slice a lot and comes in. But, as I have practised with him quite a bit, maybe I am better prepared than if I would have never hit with him before".
Federer is 17-0 in his career against the 35-year-old Ferrer, who was ranked third in the world in 2013 but is now at No.33.
Federer opened the second set with a break and cruised through the rest of the match, which lasted just over an hour.
"My game plan worked better against Bautista Agut than against Ferrer", he said.
Donaldson, 20, was seeking a first career quarterfinal in a Masters Series tournament, where he is 0-13 in round of 16 matches.
"I played a lot of good matches, especially against Dimitrov", said Haase.
"I didn't, but I managed to win because I kept fighting".